cc-wrapper: match useGccForLibs conditional order
This breaks an evaluation cycle between `cc` and `gccForLibs` for cross builds, fixing an infinite recursion error.
This commit is contained in:
parent
7ed23e37bd
commit
2f1131cff7
@ -299,10 +299,11 @@ stdenv.mkDerivation {
|
||||
# vs libstdc++, etc.) since Darwin isn't `useLLVM` on all counts. (See
|
||||
# https://clang.llvm.org/docs/Toolchain.html for all the axes one might
|
||||
# break `useLLVM` into.)
|
||||
+ optionalString (isClang && gccForLibs != null
|
||||
+ optionalString (isClang
|
||||
&& targetPlatform.isLinux
|
||||
&& !(stdenv.targetPlatform.useAndroidPrebuilt or false)
|
||||
&& !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
&& !(stdenv.targetPlatform.useLLVM or false)
|
||||
&& gccForLibs != null) ''
|
||||
echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags
|
||||
''
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user