diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-02-05 15:27:20 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-04-06 13:01:28 -0400 |
commit | 410c76eea7370f2d1143cf79aa524fcdec184f89 (patch) | |
tree | c33e28b86e66b2d11717092be017baa536927f02 /compiler/GHC/Linker | |
parent | 5ece5c5a225d9919d87a6d760f4e583775793b8c (diff) | |
download | haskell-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/Linker')
-rw-r--r-- | compiler/GHC/Linker/Types.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/GHC/Linker/Types.hs b/compiler/GHC/Linker/Types.hs index 040b7f8deb..ac01f35e33 100644 --- a/compiler/GHC/Linker/Types.hs +++ b/compiler/GHC/Linker/Types.hs @@ -14,6 +14,7 @@ module GHC.Linker.Types , LinkableSet , mkLinkableSet , unionLinkableSet + , ObjFile , Unlinked(..) , SptEntry(..) , isObjectLinkable @@ -148,9 +149,11 @@ instance Outputable Linkable where = (text "LinkableM" <+> parens (text (show when_made)) <+> ppr mod) $$ nest 3 (ppr unlinkeds) +type ObjFile = FilePath + -- | Objects which have yet to be linked by the compiler data Unlinked - = DotO FilePath -- ^ An object file (.o) + = DotO ObjFile -- ^ An object file (.o) | DotA FilePath -- ^ Static archive file (.a) | DotDLL FilePath -- ^ Dynamically linked library file (.so, .dll, .dylib) | BCOs CompiledByteCode |