llvmPackages_*.clang: pick clangUseLLVM if targetPlatform.useLLVM
libcxxClang still depends on cc wrapper's gccForLibs for libgcc which is not available when useLLVM is set. In such cases we need to switch to clangUseLLVM and (try) to use compiler-rt instead. Resolves #153759: pkgsLLVM.llvmPackages.stdenv now correctly clangUseLLVM as cc, allowing compilation to work as expected.
This commit is contained in:
parent
766f5ffb76
commit
e238f456b8
@ -91,8 +91,8 @@ let
|
||||
|
||||
# pick clang appropriate for package set we are targeting
|
||||
clang =
|
||||
if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU
|
||||
then tools.libstdcxxClang
|
||||
/**/ 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 {
|
||||
|
@ -106,8 +106,8 @@ let
|
||||
|
||||
# pick clang appropriate for package set we are targeting
|
||||
clang =
|
||||
if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU
|
||||
then tools.libstdcxxClang
|
||||
/**/ 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 {
|
||||
|
@ -94,8 +94,8 @@ let
|
||||
|
||||
# pick clang appropriate for package set we are targeting
|
||||
clang =
|
||||
if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU
|
||||
then tools.libstdcxxClang
|
||||
/**/ 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 {
|
||||
|
@ -95,8 +95,8 @@ let
|
||||
|
||||
# pick clang appropriate for package set we are targeting
|
||||
clang =
|
||||
if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU
|
||||
then tools.libstdcxxClang
|
||||
/**/ 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 {
|
||||
|
@ -67,8 +67,8 @@ let
|
||||
|
||||
# pick clang appropriate for package set we are targeting
|
||||
clang =
|
||||
if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU
|
||||
then tools.libstdcxxClang
|
||||
/**/ 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 {
|
||||
|
@ -68,8 +68,8 @@ let
|
||||
|
||||
# pick clang appropriate for package set we are targeting
|
||||
clang =
|
||||
if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU
|
||||
then tools.libstdcxxClang
|
||||
/**/ 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 {
|
||||
|
@ -98,8 +98,8 @@ let
|
||||
|
||||
# pick clang appropriate for package set we are targeting
|
||||
clang =
|
||||
if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU
|
||||
then tools.libstdcxxClang
|
||||
/**/ 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 {
|
||||
|
@ -99,8 +99,8 @@ let
|
||||
|
||||
# pick clang appropriate for package set we are targeting
|
||||
clang =
|
||||
if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU
|
||||
then tools.libstdcxxClang
|
||||
/**/ 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 {
|
||||
|
@ -99,8 +99,8 @@ let
|
||||
|
||||
# pick clang appropriate for package set we are targeting
|
||||
clang =
|
||||
if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU
|
||||
then tools.libstdcxxClang
|
||||
/**/ 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 {
|
||||
|
@ -95,8 +95,8 @@ let
|
||||
|
||||
# pick clang appropriate for package set we are targeting
|
||||
clang =
|
||||
if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU
|
||||
then tools.libstdcxxClang
|
||||
/**/ 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user