summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-06-23 12:45:27 -0500
committerWill Dietz <w@wdtz.org>2018-06-23 14:06:55 -0500
commit708848922334379382cfd072b1a24dd10dd128c2 (patch)
treed5e97ec2906930e00ab3b1691f6c95b714099bb6 /pkgs/development
parentced21f5e1a1479e3b6ae5c218818790596f5a16f (diff)
downloadnixlib-708848922334379382cfd072b1a24dd10dd128c2.tar
nixlib-708848922334379382cfd072b1a24dd10dd128c2.tar.gz
nixlib-708848922334379382cfd072b1a24dd10dd128c2.tar.bz2
nixlib-708848922334379382cfd072b1a24dd10dd128c2.tar.lz
nixlib-708848922334379382cfd072b1a24dd10dd128c2.tar.xz
nixlib-708848922334379382cfd072b1a24dd10dd128c2.tar.zst
nixlib-708848922334379382cfd072b1a24dd10dd128c2.zip
llvm-{5,6}: unconditionally set triples
Previously we only set these when using musl.

See https://github.com/NixOS/nixpkgs/pull/42452#discussion_r197618464

Same should be done for changes in #42452,
I'll add a follow-up commit doing so in the PR containing this
or wherever makes sense-- depending on how review/merging of that goes.

Sending similar changes for LLVM 4 to master, as suggested.
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/llvm/5/llvm.nix9
-rw-r--r--pkgs/development/compilers/llvm/6/llvm.nix10
2 files changed, 9 insertions, 10 deletions
diff --git a/pkgs/development/compilers/llvm/5/llvm.nix b/pkgs/development/compilers/llvm/5/llvm.nix
index 8809859b5905..31750e2d0da8 100644
--- a/pkgs/development/compilers/llvm/5/llvm.nix
+++ b/pkgs/development/compilers/llvm/5/llvm.nix
@@ -80,6 +80,10 @@ in stdenv.mkDerivation (rec {
     "-DLLVM_BUILD_TESTS=ON"
     "-DLLVM_ENABLE_FFI=ON"
     "-DLLVM_ENABLE_RTTI=ON"
+
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}"
+    "-DTARGET_TRIPLE=${stdenv.targetPlatform.config}"
   ]
   ++ stdenv.lib.optional enableSharedLibraries
     "-DLLVM_LINK_LLVM_DYLIB=ON"
@@ -95,11 +99,6 @@ in stdenv.mkDerivation (rec {
   ++ stdenv.lib.optionals (isDarwin) [
     "-DLLVM_ENABLE_LIBCXX=ON"
     "-DCAN_TARGET_i386=false"
-  ]
-  ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
-    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
-    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}"
-    "-DTARGET_TRIPLE=${stdenv.targetPlatform.config}"
   ];
 
   postBuild = ''
diff --git a/pkgs/development/compilers/llvm/6/llvm.nix b/pkgs/development/compilers/llvm/6/llvm.nix
index 9cae65ef1030..e33fc5bd4a60 100644
--- a/pkgs/development/compilers/llvm/6/llvm.nix
+++ b/pkgs/development/compilers/llvm/6/llvm.nix
@@ -76,6 +76,10 @@ in stdenv.mkDerivation (rec {
     "-DLLVM_BUILD_TESTS=ON"
     "-DLLVM_ENABLE_FFI=ON"
     "-DLLVM_ENABLE_RTTI=ON"
+
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}"
+    "-DTARGET_TRIPLE=${stdenv.targetPlatform.config}"
   ]
   ++ stdenv.lib.optional enableSharedLibraries
     "-DLLVM_LINK_LLVM_DYLIB=ON"
@@ -92,11 +96,7 @@ in stdenv.mkDerivation (rec {
     "-DLLVM_ENABLE_LIBCXX=ON"
     "-DCAN_TARGET_i386=false"
   ]
-  ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
-    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
-    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}"
-    "-DTARGET_TRIPLE=${stdenv.targetPlatform.config}"
-  ] ++ stdenv.lib.optional enableWasm
+  ++ stdenv.lib.optional enableWasm
    "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
   ;