llvm_12: add back --gcc-toolchain logic

In master commit 0710308402 this was
removed from all LLVM versions, but we don't this commit on 20.09,
so when LLVM 12 was backported, there was no `--gcc-toolchain` in
`llvmPackages_12.stdenv`.
This commit is contained in:
Milan Pässler
2021-04-22 12:57:24 +02:00
committed by Milan
parent a370c98063
commit 2774cee410

View File

@@ -29,6 +29,8 @@ let
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
'' + lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) ''
echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags
'';
in {