Skip to content

Commit

Permalink
llvm: don’t use targetPlatform
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matthewbauer committed Feb 27, 2019
1 parent e636578 commit ead13a3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pkgs/development/compilers/llvm/3.8/llvm.nix
Expand Up @@ -79,8 +79,8 @@ in stdenv.mkDerivation rec {
"-DLLVM_ENABLE_RTTI=ON"

"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}"
"-DTARGET_TRIPLE=${stdenv.targetPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
"-DTARGET_TRIPLE=${stdenv.hostPlatform.config}"
] ++ stdenv.lib.optional enableSharedLibraries [
"-DLLVM_LINK_LLVM_DYLIB=ON"
] ++ stdenv.lib.optional (!isDarwin)
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/llvm/3.9/llvm.nix
Expand Up @@ -120,8 +120,8 @@ in stdenv.mkDerivation rec {
"-DCOMPILER_RT_INCLUDE_TESTS=OFF" # FIXME: requires clang source code

"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}"
"-DTARGET_TRIPLE=${stdenv.targetPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
"-DTARGET_TRIPLE=${stdenv.hostPlatform.config}"
] ++ stdenv.lib.optional enableSharedLibraries [
"-DLLVM_LINK_LLVM_DYLIB=ON"
] ++ stdenv.lib.optional (!isDarwin)
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/llvm/4/llvm.nix
Expand Up @@ -100,8 +100,8 @@ in stdenv.mkDerivation (rec {
"-DCOMPILER_RT_INCLUDE_TESTS=OFF" # FIXME: requires clang source code

"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}"
"-DTARGET_TRIPLE=${stdenv.targetPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
"-DTARGET_TRIPLE=${stdenv.hostPlatform.config}"
]
++ stdenv.lib.optional enableSharedLibraries
"-DLLVM_LINK_LLVM_DYLIB=ON"
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/llvm/6/llvm.nix
Expand Up @@ -94,7 +94,7 @@ in stdenv.mkDerivation (rec {
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_ENABLE_RTTI=ON"
"-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_ENABLE_DUMP=ON"
] ++ optionals enableSharedLibraries [
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/llvm/7/llvm.nix
Expand Up @@ -106,7 +106,7 @@ in stdenv.mkDerivation (rec {
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_ENABLE_RTTI=ON"
"-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_ENABLE_DUMP=ON"
] ++ optionals enableSharedLibraries [
Expand Down

0 comments on commit ead13a3

Please sign in to comment.