diff options
author | John Ericson <git@JohnEricson.me> | 2022-01-08 12:39:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-08 12:39:30 -0800 |
commit | baf290023c22a6f32dd34deb6f22d5b2f75fdc01 (patch) | |
tree | 3d3e648a570845b439a11ccb7b32ac7e75ff3931 /pkgs/development/compilers/llvm/git/default.nix | |
parent | 0ed184fb68d646408be936af83d52a1d7f23b296 (diff) | |
parent | e238f456b8d643d5afe5370e942e82204907d0ef (diff) |
Merge pull request #153790 from sternenseemann/cross-bootstrap-logic
Cross bootstrapping logic fixes benefitting llvmPackages
Diffstat (limited to 'pkgs/development/compilers/llvm/git/default.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/git/default.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/compilers/llvm/git/default.nix b/pkgs/development/compilers/llvm/git/default.nix index 666e9be3cd89e..890270c851dbc 100644 --- a/pkgs/development/compilers/llvm/git/default.nix +++ b/pkgs/development/compilers/llvm/git/default.nix @@ -93,7 +93,11 @@ let # python3 = pkgs.python3; # don't use python-boot # }); - clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang; + # pick clang appropriate for package set we are targeting + clang = + /**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM + else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang + else tools.libcxxClang; libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; |