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.
This commit is contained in:
parent
ced21f5e1a
commit
7088489223
2 changed files with 9 additions and 10 deletions
|
@ -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 = ''
|
||||
|
|
|
@ -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"
|
||||
;
|
||||
|
||||
|
|
Loading…
Reference in a new issue