about summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2019-04-17 00:16:36 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2019-04-23 21:48:58 -0400
commit9044f57d183dcf2443df52ccc58911970171584d (patch)
tree636cd43b376ccb657f2bf62fc73272a1e460d408 /pkgs/development/compilers/llvm
parent1a7a96a093c8c3ee25ab18e36473394e1e2a5b0a (diff)
downloadnixlib-9044f57d183dcf2443df52ccc58911970171584d.tar
nixlib-9044f57d183dcf2443df52ccc58911970171584d.tar.gz
nixlib-9044f57d183dcf2443df52ccc58911970171584d.tar.bz2
nixlib-9044f57d183dcf2443df52ccc58911970171584d.tar.lz
nixlib-9044f57d183dcf2443df52ccc58911970171584d.tar.xz
nixlib-9044f57d183dcf2443df52ccc58911970171584d.tar.zst
nixlib-9044f57d183dcf2443df52ccc58911970171584d.zip
compiler-rt: Don't try to build a test executable
Got this trick from stack overflow to avoid needing compiler-rt to link
the test exe before building compiler-rt. a static lib isn't linked at
all, and so breaks the cycle.
Diffstat (limited to 'pkgs/development/compilers/llvm')
-rw-r--r--pkgs/development/compilers/llvm/8/compiler-rt.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/compilers/llvm/8/compiler-rt.nix b/pkgs/development/compilers/llvm/8/compiler-rt.nix
index 33eef4358256..2b591cc94aff 100644
--- a/pkgs/development/compilers/llvm/8/compiler-rt.nix
+++ b/pkgs/development/compilers/llvm/8/compiler-rt.nix
@@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
     "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
     "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+    #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
+    "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
     "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
   ] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
     "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
@@ -62,7 +64,5 @@ stdenv.mkDerivation rec {
     ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
   '';
 
-  NIX_LDFLAGS = stdenv.lib.optionalString stdenv.hostPlatform.isWasm "--allow-undefined --no-entry";
-
   enableParallelBuilding = true;
 }