summaryrefslogtreecommitdiff
path: root/compiler/GHC
diff options
context:
space:
mode:
authorSergey Vinokurov <serg.foo@gmail.com>2022-01-05 01:33:06 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-01-18 16:15:12 -0500
commit21510698817fbe7254112b5967854cad28a612bf (patch)
tree6e520363978d7f20f5fc3ca3ab1c3d3a83693cb2 /compiler/GHC
parent01254ceb5173ddb179c6ead0d6b60f7ac5a86e83 (diff)
downloadhaskell-21510698817fbe7254112b5967854cad28a612bf.tar.gz
Improve detection of lld linker
Newer lld versions may include vendor info in --version output and thus the version string may not start with ‘LLD’. Fixes #20907
Diffstat (limited to 'compiler/GHC')
-rw-r--r--compiler/GHC/SysTools/Info.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/SysTools/Info.hs b/compiler/GHC/SysTools/Info.hs
index 12be61ea0b..83a76b9efb 100644
--- a/compiler/GHC/SysTools/Info.hs
+++ b/compiler/GHC/SysTools/Info.hs
@@ -142,7 +142,7 @@ getLinkerInfo' logger dflags = do
-- ELF specific flag, see Note [ELF needed shared libs]
return (GnuGold [Option "-Wl,--no-as-needed"])
- | any ("LLD" `isPrefixOf`) stdo =
+ | any (\line -> "LLD" `isPrefixOf` line || "LLD" `elem` words line) stdo =
return (LlvmLLD $ map Option [ --see Note [ELF needed shared libs]
"-Wl,--no-as-needed"])