diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-10-03 01:47:08 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-10-03 01:47:08 +0200 |
commit | b3fcd9375d89060979ce67d13c6714ebc3e1c002 (patch) | |
tree | e5120c8684e77b7b579c5fd348915cecdca66c57 /pkgs/development/compilers/llvm/7/compiler-rt.nix | |
parent | 3a4658ea04d66e849aa29c1f747ab8becc14949c (diff) | |
parent | 3dc58eda52ef935313cd0418264abd1d30d6b4d3 (diff) | |
download | nixlib-b3fcd9375d89060979ce67d13c6714ebc3e1c002.tar nixlib-b3fcd9375d89060979ce67d13c6714ebc3e1c002.tar.gz nixlib-b3fcd9375d89060979ce67d13c6714ebc3e1c002.tar.bz2 nixlib-b3fcd9375d89060979ce67d13c6714ebc3e1c002.tar.lz nixlib-b3fcd9375d89060979ce67d13c6714ebc3e1c002.tar.xz nixlib-b3fcd9375d89060979ce67d13c6714ebc3e1c002.tar.zst nixlib-b3fcd9375d89060979ce67d13c6714ebc3e1c002.zip |
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/development/compilers/llvm/7/compiler-rt.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/7/compiler-rt.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/development/compilers/llvm/7/compiler-rt.nix b/pkgs/development/compilers/llvm/7/compiler-rt.nix index 0912435327ce..5d7266f39ecd 100644 --- a/pkgs/development/compilers/llvm/7/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/7/compiler-rt.nix @@ -7,11 +7,11 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake python llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - cmakeFlags = [ + cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false || stdenv.isDarwin) [ "-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.useLLVM or false) [ "-DCMAKE_C_FLAGS=-nodefaultlibs" "-DCMAKE_CXX_COMPILER_WORKS=ON" "-DCOMPILER_RT_BUILD_BUILTINS=ON" @@ -26,7 +26,7 @@ stdenv.mkDerivation { patches = [ ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory - ] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch + ] ++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) ./crtbegin-and-end.patch ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch; # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks @@ -37,7 +37,7 @@ stdenv.mkDerivation { postPatch = stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' - '' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + '' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) '' substituteInPlace lib/builtins/int_util.c \ --replace "#include <stdlib.h>" "" substituteInPlace lib/builtins/clear_cache.c \ @@ -49,7 +49,7 @@ stdenv.mkDerivation { # Hack around weird upsream RPATH bug postInstall = stdenv.lib.optionalString stdenv.isDarwin '' ln -s "$out/lib"/*/* "$out/lib" - '' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + '' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) '' ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/linux/crtbegin.o ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/linux/crtend.o ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/linux/crtbeginS.o |