From 69a1f31e5f7af7637d20ea2408c8716bfd5cb5ca Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Thu, 18 Feb 2016 14:57:32 +0100 Subject: [PATCH] Pass 'ghc-shared-options' to GHC during the linking phase. See discussion in #3158. --- Cabal/Distribution/Simple/GHC.hs | 2 ++ Cabal/Distribution/Simple/GHCJS.hs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Cabal/Distribution/Simple/GHC.hs b/Cabal/Distribution/Simple/GHC.hs index 4b21805ec9a..fc12d9632ff 100644 --- a/Cabal/Distribution/Simple/GHC.hs +++ b/Cabal/Distribution/Simple/GHC.hs @@ -708,6 +708,8 @@ buildOrReplLib forRepl verbosity numJobs pkg_descr lbi lib clbi = do ghcOptDynLinkMode = toFlag GhcDynamicOnly, ghcOptInputFiles = toNubListR dynamicObjectFiles, ghcOptOutputFile = toFlag sharedLibFilePath, + ghcOptExtra = toNubListR $ + hcSharedOptions GHC libBi, -- For dynamic libs, Mac OS/X needs to know the install location -- at build time. This only applies to GHC < 7.8 - see the -- discussion in #1660. diff --git a/Cabal/Distribution/Simple/GHCJS.hs b/Cabal/Distribution/Simple/GHCJS.hs index 2ecc70ed723..ac5d4dc75aa 100644 --- a/Cabal/Distribution/Simple/GHCJS.hs +++ b/Cabal/Distribution/Simple/GHCJS.hs @@ -464,6 +464,8 @@ buildOrReplLib forRepl verbosity numJobs _pkg_descr lbi lib clbi = do ghcOptDynLinkMode = toFlag GhcDynamicOnly, ghcOptInputFiles = toNubListR dynamicObjectFiles, ghcOptOutputFile = toFlag sharedLibFilePath, + ghcOptExtra = toNubListR $ + ghcjsSharedOptions libBi, ghcOptNoAutoLinkPackages = toFlag True, ghcOptPackageDBs = withPackageDB lbi, ghcOptPackages = toNubListR $