git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #57981 from dtzWill/fix/llvm8-musl

llvmPackages_8: fix w/musl

commit7a1e8300fd8fe73a270507080e9cb4f14e02b0b6 authorWill Dietz <github@wdtz.org> dateWed 20 Mar 2019, 14:49 (8 years ago) parent3b7c3cb8d378eb
2 files changed+9−2
pkgs/development/compilers/llvm/8/compiler-rt.nix+7−2 pkgs/development/compilers/llvm/8/llvm.nix+2
pkgs/development/compilers/llvm/8/compiler-rt.nix+7−2
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
1111 "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
1212 "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
1313 "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
14− ] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
14+ ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
1515 "-DCMAKE_C_FLAGS=-nodefaultlibs"
1616 "-DCMAKE_CXX_COMPILER_WORKS=ON"
1717 "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
@@ -20,13 +20,18 @@ stdenv.mkDerivation rec {
2020 "-DCOMPILER_RT_BUILD_PROFILE=OFF"
2121 "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
2222 "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
23+ ] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
24+ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
25+ "-DCOMPILER_RT_BUILD_XRAY=OFF"
26+ "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
27+ "-DCOMPILER_RT_BUILD_PROFILE=OFF"
2328 ];
2429
2530 outputs = [ "out" "dev" ];
2631
2732 patches = [
2833 ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
29− ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
34+ ]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
3035 ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch
3136 ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin ./compiler-rt-clock_gettime.patch;
3237
pkgs/development/compilers/llvm/8/llvm.nix+2
@@ -71,6 +71,8 @@ in stdenv.mkDerivation (rec {
7171 substituteInPlace unittests/Support/CMakeLists.txt \
7272 --replace "add_subdirectory(DynamicLibrary)" ""
7373 rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
74+ # valgrind unhappy with musl or glibc, but fails w/musl only
75+ rm test/CodeGen/AArch64/wineh4.mir
7476 '' + ''
7577 patchShebangs test/BugPoint/compile-custom.ll.py
7678 '';