diff options
Diffstat (limited to 'pkgs/development/compilers/llvm/10/llvm/default.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/10/llvm/default.nix | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/development/compilers/llvm/10/llvm/default.nix b/pkgs/development/compilers/llvm/10/llvm/default.nix index 6f8ef0b5751..c09ec676e9e 100644 --- a/pkgs/development/compilers/llvm/10/llvm/default.nix +++ b/pkgs/development/compilers/llvm/10/llvm/default.nix @@ -133,7 +133,17 @@ in stdenv.mkDerivation (rec { hash = "sha256-CXwYxQezTq5vdmc8Yn88BUAEly6YZ5VEIA6X3y5NNOs="; stripLen = 1; }) - ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch; + ] ++ lib.optionals enablePolly [ + ./gnu-install-dirs-polly.patch + # Add missing isl header includess required to build LLVM 10 + Polly with clang 16. + (fetchpatch { + name = "polly-ppcg-isl-headers.patch"; + url = "https://repo.or.cz/ppcg.git/patch/098ba285306114dc71497f7b51c357f69c9b4472"; + hash = "sha256-c9L30rDROYAMbUSuaK9U/ixyFMlH/Sa1n+VgLODzSCQ="; + extraPrefix = "tools/polly/lib/External/ppcg/"; + stripLen = 1; + }) + ]; postPatch = optionalString stdenv.isDarwin '' substituteInPlace cmake/modules/AddLLVM.cmake \ @@ -204,6 +214,8 @@ in stdenv.mkDerivation (rec { ln -sv $PWD/lib $out ''; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -219,7 +231,6 @@ in stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" |