diff options
Diffstat (limited to 'pkgs/development/compilers/llvm/13')
-rw-r--r-- | pkgs/development/compilers/llvm/13/llvm/default.nix | 3 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/13/openmp/default.nix | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/development/compilers/llvm/13/llvm/default.nix b/pkgs/development/compilers/llvm/13/llvm/default.nix index 827e528581c..2a7c1c1867c 100644 --- a/pkgs/development/compilers/llvm/13/llvm/default.nix +++ b/pkgs/development/compilers/llvm/13/llvm/default.nix @@ -164,6 +164,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + 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 @@ -179,7 +181,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" diff --git a/pkgs/development/compilers/llvm/13/openmp/default.nix b/pkgs/development/compilers/llvm/13/openmp/default.nix index 8eca980d601..7b461df438f 100644 --- a/pkgs/development/compilers/llvm/13/openmp/default.nix +++ b/pkgs/development/compilers/llvm/13/openmp/default.nix @@ -2,6 +2,7 @@ , stdenv , llvm_meta , src +, fetchpatch , cmake , llvm , targetLlvm @@ -16,6 +17,16 @@ stdenv.mkDerivation rec { inherit src; sourceRoot = "${src.name}/${pname}"; + patches = [ + # Fix cross. + (fetchpatch { + url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch"; + hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A="; + }) + ]; + + patchFlags = [ "-p2" ]; + nativeBuildInputs = [ cmake perl ]; buildInputs = [ (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) |