summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Packages.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Driver/Packages.hs')
-rw-r--r--compiler/GHC/Driver/Packages.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/GHC/Driver/Packages.hs b/compiler/GHC/Driver/Packages.hs
index b2299a1403..3e85251da2 100644
--- a/compiler/GHC/Driver/Packages.hs
+++ b/compiler/GHC/Driver/Packages.hs
@@ -2155,9 +2155,8 @@ displayInstalledUnitId pkgstate uid =
fmap sourcePackageIdString (lookupInstalledPackage pkgstate uid)
-- | Will the 'Name' come from a dynamically linked package?
-isDynLinkName :: DynFlags -> Module -> Name -> Bool
-isDynLinkName dflags this_mod name
- | not (gopt Opt_ExternalDynamicRefs dflags) = False
+isDynLinkName :: Platform -> Module -> Name -> Bool
+isDynLinkName platform this_mod name
| Just mod <- nameModule_maybe name
-- Issue #8696 - when GHC is dynamically linked, it will attempt
-- to load the dynamic dependencies of object files at compile
@@ -2171,7 +2170,7 @@ isDynLinkName dflags this_mod name
-- In the mean time, always force dynamic indirections to be
-- generated: when the module name isn't the module being
-- compiled, references are dynamic.
- = case platformOS $ targetPlatform dflags of
+ = case platformOS platform of
-- On Windows the hack for #8696 makes it unlinkable.
-- As the entire setup of the code from Cmm down to the RTS expects
-- the use of trampolines for the imported functions only when