mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 10:53:52 +00:00
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.
This commit is contained in:
parent
1a7a96a093
commit
9044f57d18
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user