about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2019-02-28 04:27:46 +0100
committerPierre Bourdon <delroth@gmail.com>2019-02-28 04:29:05 +0100
commit7541e4f8accccf4ae40486797c4a2fe969d12e6c (patch)
tree1ce8e11eaa7a0634c372deebe8dbf9510f80e4a7 /pkgs/development/compilers
parent83c92d8215e3c4bd408794bea92afdbd0f5bc912 (diff)
downloadnixlib-7541e4f8accccf4ae40486797c4a2fe969d12e6c.tar
nixlib-7541e4f8accccf4ae40486797c4a2fe969d12e6c.tar.gz
nixlib-7541e4f8accccf4ae40486797c4a2fe969d12e6c.tar.bz2
nixlib-7541e4f8accccf4ae40486797c4a2fe969d12e6c.tar.lz
nixlib-7541e4f8accccf4ae40486797c4a2fe969d12e6c.tar.xz
nixlib-7541e4f8accccf4ae40486797c4a2fe969d12e6c.tar.zst
nixlib-7541e4f8accccf4ae40486797c4a2fe969d12e6c.zip
llvm/7/compiler-rt: define CMAKE_*_COMPILER_TARGET unconditionally
When building with -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON the compiler-rt
CMake configuration attempts to use CMAKE_*_COMPILER_TARGET variables,
which are usually only defined in cross-compilation mode.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/llvm/7/compiler-rt.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/compilers/llvm/7/compiler-rt.nix b/pkgs/development/compilers/llvm/7/compiler-rt.nix
index 1c5d647a2269..b44ba62ee924 100644
--- a/pkgs/development/compilers/llvm/7/compiler-rt.nix
+++ b/pkgs/development/compilers/llvm/7/compiler-rt.nix
@@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
 
   cmakeFlags = [
     "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
+    "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+    "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
   ] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
     "-DCMAKE_C_FLAGS=-nodefaultlibs"
     "-DCMAKE_CXX_COMPILER_WORKS=ON"
@@ -17,8 +19,6 @@ stdenv.mkDerivation rec {
     "-DCOMPILER_RT_BUILD_XRAY=OFF"
     "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
-    "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
-    "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
     "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
   ];