diff options
| author | Tamar Christina <tamar@zhox.com> | 2017-08-28 12:29:48 -0400 |
|---|---|---|
| committer | Ben Gamari <ben@smart-cactus.org> | 2017-08-29 12:38:10 -0400 |
| commit | 5266ab9059dffa741b172636f50f1fbfd491dbb4 (patch) | |
| tree | 33a59d9f309d775e318cef3b160cec34f359e0c3 /compiler/main/Packages.hs | |
| parent | db3a8e168ad81f54ec58eebc4c75a0eaad889daf (diff) | |
| download | haskell-5266ab9059dffa741b172636f50f1fbfd491dbb4.tar.gz | |
Remove dll-split.
This patch removes dll-split from the code base, the reason is dll-split
no longer makes any sense. It was designed to split a dll in two, but we
now already have many more symbols than would fit inside two dlls. So we
need a third one. This means there's no point in having to maintain this
list as it'll never work anyway and the solution isn't scalable.
Test Plan: ./validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, #ghc_windows_task_force
GHC Trac Issues: #5987
Differential Revision: https://phabricator.haskell.org/D3882
Diffstat (limited to 'compiler/main/Packages.hs')
| -rw-r--r-- | compiler/main/Packages.hs | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs index 50b9967e01..01d66cb740 100644 --- a/compiler/main/Packages.hs +++ b/compiler/main/Packages.hs @@ -71,6 +71,7 @@ import UniqSet import Module import Util import Panic +import Platform import Outputable import Maybes @@ -1966,16 +1967,19 @@ isDllName 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. - = if mod /= this_mod - then True - else case dllSplit dflags of - Nothing -> False - Just ss -> - let findMod m = let modStr = moduleNameString (moduleName m) - in case find (modStr `Set.member`) ss of - Just i -> i - Nothing -> panic ("Can't find " ++ modStr ++ "in DLL split") - in findMod mod /= findMod this_mod + = case platformOS $ targetPlatform dflags 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 + -- doing intra-package linking, e.g. refering to a symbol defined in the same + -- package should not use a trampoline. + -- I much rather have dynamic TH not supported than the entire Dynamic linking + -- not due to a hack. + -- Also not sure this would break on Windows anyway. + OSMinGW32 -> moduleUnitId mod /= moduleUnitId this_mod + + -- For the other platforms, still perform the hack + _ -> mod /= this_mod | otherwise = False -- no, it is not even an external name |
