llvm: don’t use targetPlatform

LLVM should be target independent because it will work with all
machine types. This is different from GCC where it needs to know what
target to build ahead of time.
This commit is contained in:
Matthew Bauer 2019-02-11 19:32:11 -05:00
parent e636578d38
commit ead13a3aca
5 changed files with 8 additions and 8 deletions

View File

@ -79,8 +79,8 @@ in stdenv.mkDerivation rec {
"-DLLVM_ENABLE_RTTI=ON" "-DLLVM_ENABLE_RTTI=ON"
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}" "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
"-DTARGET_TRIPLE=${stdenv.targetPlatform.config}" "-DTARGET_TRIPLE=${stdenv.hostPlatform.config}"
] ++ stdenv.lib.optional enableSharedLibraries [ ] ++ stdenv.lib.optional enableSharedLibraries [
"-DLLVM_LINK_LLVM_DYLIB=ON" "-DLLVM_LINK_LLVM_DYLIB=ON"
] ++ stdenv.lib.optional (!isDarwin) ] ++ stdenv.lib.optional (!isDarwin)

View File

@ -120,8 +120,8 @@ in stdenv.mkDerivation rec {
"-DCOMPILER_RT_INCLUDE_TESTS=OFF" # FIXME: requires clang source code "-DCOMPILER_RT_INCLUDE_TESTS=OFF" # FIXME: requires clang source code
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}" "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
"-DTARGET_TRIPLE=${stdenv.targetPlatform.config}" "-DTARGET_TRIPLE=${stdenv.hostPlatform.config}"
] ++ stdenv.lib.optional enableSharedLibraries [ ] ++ stdenv.lib.optional enableSharedLibraries [
"-DLLVM_LINK_LLVM_DYLIB=ON" "-DLLVM_LINK_LLVM_DYLIB=ON"
] ++ stdenv.lib.optional (!isDarwin) ] ++ stdenv.lib.optional (!isDarwin)

View File

@ -100,8 +100,8 @@ in stdenv.mkDerivation (rec {
"-DCOMPILER_RT_INCLUDE_TESTS=OFF" # FIXME: requires clang source code "-DCOMPILER_RT_INCLUDE_TESTS=OFF" # FIXME: requires clang source code
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}" "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
"-DTARGET_TRIPLE=${stdenv.targetPlatform.config}" "-DTARGET_TRIPLE=${stdenv.hostPlatform.config}"
] ]
++ stdenv.lib.optional enableSharedLibraries ++ stdenv.lib.optional enableSharedLibraries
"-DLLVM_LINK_LLVM_DYLIB=ON" "-DLLVM_LINK_LLVM_DYLIB=ON"

View File

@ -94,7 +94,7 @@ in stdenv.mkDerivation (rec {
"-DLLVM_ENABLE_FFI=ON" "-DLLVM_ENABLE_FFI=ON"
"-DLLVM_ENABLE_RTTI=ON" "-DLLVM_ENABLE_RTTI=ON"
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}" "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly" "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
"-DLLVM_ENABLE_DUMP=ON" "-DLLVM_ENABLE_DUMP=ON"
] ++ optionals enableSharedLibraries [ ] ++ optionals enableSharedLibraries [

View File

@ -106,7 +106,7 @@ in stdenv.mkDerivation (rec {
"-DLLVM_ENABLE_FFI=ON" "-DLLVM_ENABLE_FFI=ON"
"-DLLVM_ENABLE_RTTI=ON" "-DLLVM_ENABLE_RTTI=ON"
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}" "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly" "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
"-DLLVM_ENABLE_DUMP=ON" "-DLLVM_ENABLE_DUMP=ON"
] ++ optionals enableSharedLibraries [ ] ++ optionals enableSharedLibraries [