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" ;