mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 03:39:59 +00:00
haskell.compiler.ghc921: check if ld.gold is available in useLdGold
Since4c75874560it is possible to introspect if ld.gold is contained in the used bintools, so we can also check if it is available before deciding to use it as done in the other GHC derivations in0908812372. (cherry picked from commitb2e4708105)
This commit is contained in:
committed by
Jonathan Ringer
parent
c982f51917
commit
2717ee493c
@@ -127,7 +127,8 @@ let
|
||||
# Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
|
||||
# But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
|
||||
# see #84670 and #49071 for more background.
|
||||
useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && !targetPlatform.isMusl);
|
||||
useLdGold = targetPlatform.linker == "gold" ||
|
||||
(targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
|
||||
|
||||
runtimeDeps = [
|
||||
targetPackages.stdenv.cc.bintools
|
||||
|
||||
Reference in New Issue
Block a user