Hadrian: don't use -zorigin on darwin.
authorDavid Eichmann <EichmannD@gmail.com>
Tue, 19 Mar 2019 11:42:27 +0000 (11:42 +0000)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Wed, 27 Mar 2019 11:20:09 +0000 (07:20 -0400)
hadrian/src/Settings/Builders/Ghc.hs

index 92f1e68..7b0011c 100644 (file)
@@ -99,10 +99,9 @@ ghcLinkArgs = builder (Ghc LinkHs) ? do
                 [ arg "-dynamic"
                 -- TODO what about windows?
                 , isLibrary pkg ? pure [ "-shared", "-dynload", "deploy" ]
-                , hostSupportsRPaths ? pure
-                    [ "-optl-Wl,-rpath," ++ rpath
-                    , "-optl-Wl,-zorigin"
-                    ]
+                , hostSupportsRPaths ? arg ("-optl-Wl,-rpath," ++ rpath)
+                -- The darwin linker doesn't support/require the -zorigin option
+                , hostSupportsRPaths ? not darwin ? arg "-optl-Wl,-zorigin"
                 ]
             , arg "-no-auto-link-packages"
             ,      nonHsMainPackage pkg  ? arg "-no-hs-main"