summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-05-20 18:36:04 +0000
committerGitHub <noreply@github.com>2021-05-20 18:36:04 +0000
commit0a0c0a9fb91a1d3e89f347e9aa04db4bf6703e54 (patch)
treed1dc24c9da6b344194843a0dc7aa3b7fabea6293 /pkgs/development/compilers/llvm
parentba7ede846b691775a6e4fd7e87fad0cc3a42b30d (diff)
parent34a05e29f119bf06fe218b761b3999e4c7a87e65 (diff)
downloadnixpkgs-0a0c0a9fb91a1d3e89f347e9aa04db4bf6703e54.tar
nixpkgs-0a0c0a9fb91a1d3e89f347e9aa04db4bf6703e54.tar.gz
nixpkgs-0a0c0a9fb91a1d3e89f347e9aa04db4bf6703e54.tar.bz2
nixpkgs-0a0c0a9fb91a1d3e89f347e9aa04db4bf6703e54.tar.lz
nixpkgs-0a0c0a9fb91a1d3e89f347e9aa04db4bf6703e54.tar.xz
nixpkgs-0a0c0a9fb91a1d3e89f347e9aa04db4bf6703e54.tar.zst
nixpkgs-0a0c0a9fb91a1d3e89f347e9aa04db4bf6703e54.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/compilers/llvm')
-rw-r--r--pkgs/development/compilers/llvm/11/compiler-rt/default.nix12
-rw-r--r--pkgs/development/compilers/llvm/11/default.nix10
2 files changed, 11 insertions, 11 deletions
diff --git a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix
index 65f8d575c56..65b024e8cc3 100644
--- a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix
+++ b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix
@@ -3,7 +3,7 @@
 let
 
   useLLVM = stdenv.hostPlatform.useLLVM or false;
-  isDarwin = stdenv.hostPlatform.isDarwin;
+  isNewDarwinBootstrap = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;
   bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
   haveLibc = stdenv.cc.libc != null;
   inherit (stdenv.hostPlatform) isMusl;
@@ -25,19 +25,19 @@ stdenv.mkDerivation {
     "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
     "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
     "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
-  ] ++ lib.optionals (useLLVM || isDarwin || bareMetal || isMusl) [
+  ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isNewDarwinBootstrap) [
     "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
     "-DCOMPILER_RT_BUILD_XRAY=OFF"
     "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
-  ] ++ lib.optionals ((useLLVM || isDarwin || bareMetal) && !haveLibc) [
+  ] ++ lib.optionals (!haveLibc || bareMetal) [
     "-DCMAKE_C_COMPILER_WORKS=ON"
     "-DCMAKE_CXX_COMPILER_WORKS=ON"
     "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
     "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
-  ] ++ lib.optionals ((useLLVM || isDarwin) && !haveLibc) [
+  ] ++ lib.optionals (!haveLibc) [
     "-DCMAKE_C_FLAGS=-nodefaultlibs"
-  ] ++ lib.optionals (useLLVM || isDarwin) [
+  ] ++ lib.optionals (useLLVM || isNewDarwinBootstrap) [
     "-DCOMPILER_RT_BUILD_BUILTINS=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"
@@ -62,7 +62,7 @@ stdenv.mkDerivation {
     ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch;
 
 
-  preConfigure = lib.optionalString isDarwin ''
+  preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
     cmakeFlagsArray+=("-DCMAKE_LIPO=$(command -v ${stdenv.cc.targetPrefix}lipo)")
   '';
 
diff --git a/pkgs/development/compilers/llvm/11/default.nix b/pkgs/development/compilers/llvm/11/default.nix
index c260964051f..3c6d767561e 100644
--- a/pkgs/development/compilers/llvm/11/default.nix
+++ b/pkgs/development/compilers/llvm/11/default.nix
@@ -213,14 +213,14 @@ let
 
     compiler-rt-libc = callPackage ./compiler-rt {
       inherit llvm_meta;
-      stdenv = if (stdenv.hostPlatform.useLLVM or false) || stdenv.hostPlatform.isDarwin
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
                then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
                else stdenv;
     };
 
     compiler-rt-no-libc = callPackage ./compiler-rt {
       inherit llvm_meta;
-      stdenv = if (stdenv.hostPlatform.useLLVM or false) || stdenv.hostPlatform.isDarwin
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
                then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
                else stdenv;
     };
@@ -236,21 +236,21 @@ let
 
     libcxx = callPackage ./libcxx {
       inherit llvm_meta;
-      stdenv = if (stdenv.hostPlatform.useLLVM or false) || stdenv.hostPlatform.isDarwin
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
                then overrideCC stdenv buildLlvmTools.clangNoLibcxx
                else stdenv;
     };
 
     libcxxabi = callPackage ./libcxxabi {
       inherit llvm_meta;
-      stdenv = if (stdenv.hostPlatform.useLLVM or false) || stdenv.hostPlatform.isDarwin
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
                then overrideCC stdenv buildLlvmTools.clangNoLibcxx
                else stdenv;
     };
 
     libunwind = callPackage ./libunwind {
       inherit llvm_meta;
-      stdenv = if (stdenv.hostPlatform.useLLVM or false) || stdenv.hostPlatform.isDarwin
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
                then overrideCC stdenv buildLlvmTools.clangNoLibcxx
                else stdenv;
     };