summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Pipeline.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-02-05 15:27:20 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-06 13:01:28 -0400
commit410c76eea7370f2d1143cf79aa524fcdec184f89 (patch)
treec33e28b86e66b2d11717092be017baa536927f02 /compiler/GHC/Driver/Pipeline.hs
parent5ece5c5a225d9919d87a6d760f4e583775793b8c (diff)
downloadhaskell-410c76eea7370f2d1143cf79aa524fcdec184f89.tar.gz
Use static archives as an alternative to object merging
Unfortunately, `lld`'s COFF backend does not currently support object merging. With ld.bfd having broken support for high image-load base addresses, it's necessary to find an alternative. Here I introduce support in the driver for generating static archives, which we use on Windows instead of object merging. Closes #21068.
Diffstat (limited to 'compiler/GHC/Driver/Pipeline.hs')
-rw-r--r--compiler/GHC/Driver/Pipeline.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/GHC/Driver/Pipeline.hs b/compiler/GHC/Driver/Pipeline.hs
index 415bb5e38f..ceb4fa0ae0 100644
--- a/compiler/GHC/Driver/Pipeline.hs
+++ b/compiler/GHC/Driver/Pipeline.hs
@@ -760,14 +760,12 @@ hscGenBackendPipeline pipe_env hsc_env mod_sum result = do
Nothing -> return mlinkable
Just o_fp -> do
unlinked_time <- liftIO (liftIO getCurrentTime)
- final_o <- use (T_MergeForeign pipe_env hsc_env o_fp fos)
- let !linkable = LM unlinked_time
- (ms_mod mod_sum)
- [DotO final_o]
+ final_unlinked <- DotO <$> use (T_MergeForeign pipe_env hsc_env o_fp fos)
+ let !linkable = LM unlinked_time (ms_mod mod_sum) [final_unlinked]
return (Just linkable)
return (miface, final_linkable)
-asPipeline :: P m => Bool -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> m FilePath
+asPipeline :: P m => Bool -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> m ObjFile
asPipeline use_cpp pipe_env hsc_env location input_fn = do
use (T_As use_cpp pipe_env hsc_env location input_fn)