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_LIBFUZZER=OFF"
|
||||||
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
||||||
"-DCOMPILER_RT_BAREMETAL_BUILD=ON"
|
"-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)}"
|
"-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
|
||||||
] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
|
] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
|
||||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
"-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
|
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;
|
enableParallelBuilding = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user