3
0
Fork 0
forked from mirrors/nixpkgs

pkgsLLVM.stdenv: use clangNoLibc when libc is null

clangNoLibc always uses LLVM bintools, so it still has the useLLVM
semantics.
This commit is contained in:
Alyssa Ross 2023-04-26 13:27:20 +00:00
parent e5d1511d5b
commit 2839c94f1e
13 changed files with 25 additions and 13 deletions

View file

@ -102,7 +102,8 @@ let
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;

View file

@ -117,7 +117,8 @@ let
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;

View file

@ -105,7 +105,8 @@ let
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;

View file

@ -106,7 +106,8 @@ let
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;

View file

@ -107,7 +107,8 @@ let
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;

View file

@ -155,7 +155,8 @@ in let
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;

View file

@ -77,7 +77,8 @@ let
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;

View file

@ -78,7 +78,8 @@ let
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;

View file

@ -109,7 +109,8 @@ let
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;

View file

@ -110,7 +110,8 @@ let
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;

View file

@ -110,7 +110,8 @@ let
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;

View file

@ -155,7 +155,8 @@ in let
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;

View file

@ -72,7 +72,7 @@ in lib.init bootStages ++ [
else if crossSystem.isDarwin
then buildPackages.llvmPackages.libcxxClang
else if crossSystem.useLLVM or false
then buildPackages.llvmPackages.clangUseLLVM
then buildPackages.llvmPackages.clang
else buildPackages.gcc;
extraNativeBuildInputs = old.extraNativeBuildInputs