mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-11 15:08:33 +01:00
Merge pull request #57981 from dtzWill/fix/llvm8-musl
llvmPackages_8: fix w/musl
This commit is contained in:
commit
7a1e8300fd
|
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
|||
"-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) [
|
||||
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"-DCMAKE_C_FLAGS=-nodefaultlibs"
|
||||
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||
|
@ -20,13 +20,18 @@ stdenv.mkDerivation rec {
|
|||
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
||||
"-DCOMPILER_RT_BAREMETAL_BUILD=ON"
|
||||
"-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
|
||||
] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
|
||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||
"-DCOMPILER_RT_BUILD_XRAY=OFF"
|
||||
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
|
||||
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
patches = [
|
||||
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
|
||||
] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
|
||||
]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin ./compiler-rt-clock_gettime.patch;
|
||||
|
||||
|
|
|
@ -71,6 +71,8 @@ in stdenv.mkDerivation (rec {
|
|||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "add_subdirectory(DynamicLibrary)" ""
|
||||
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
|
||||
# valgrind unhappy with musl or glibc, but fails w/musl only
|
||||
rm test/CodeGen/AArch64/wineh4.mir
|
||||
'' + ''
|
||||
patchShebangs test/BugPoint/compile-custom.ll.py
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue