[commit: ghc] master: Use --no-as-needed with LLD too (aa619f3)

git at git.haskell.org git at git.haskell.org
Sat Dec 8 05:05:26 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/aa619f39e39b09b6da4585b40413adcf9d54fe46/ghc

>---------------------------------------------------------------

commit aa619f39e39b09b6da4585b40413adcf9d54fe46
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Fri Dec 7 23:25:40 2018 -0500

    Use --no-as-needed with LLD too
    
    Test Plan: validate using LLD as the linker (TODO)
    
    Reviewers: bgamari, angerman, kavon, erikd
    
    Reviewed By: bgamari
    
    Subscribers: watashi, rwbarton, carter
    
    Differential Revision: https://phabricator.haskell.org/D5336


>---------------------------------------------------------------

aa619f39e39b09b6da4585b40413adcf9d54fe46
 compiler/main/SysTools/Info.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/main/SysTools/Info.hs b/compiler/main/SysTools/Info.hs
index 6b31057..420a2bf 100644
--- a/compiler/main/SysTools/Info.hs
+++ b/compiler/main/SysTools/Info.hs
@@ -142,7 +142,9 @@ getLinkerInfo' dflags = do
           return (GnuGold [Option "-Wl,--no-as-needed"])
 
         | any ("LLD" `isPrefixOf`) stdo =
-          return (LlvmLLD [])
+          return (LlvmLLD $ map Option [
+                                      -- see Note [ELF needed shared libs]
+                                      "-Wl,--no-as-needed"])
 
          -- Unknown linker.
         | otherwise = fail "invalid --version output, or linker is unsupported"



More information about the ghc-commits mailing list