diff options
| author | Ben Gamari <ben@smart-cactus.org> | 2020-10-26 14:55:47 -0400 |
|---|---|---|
| committer | Ben Gamari <ben@smart-cactus.org> | 2020-11-09 19:30:00 -0500 |
| commit | 288d65eb2243a50914def9abbee042a1429e18df (patch) | |
| tree | b82c9f39859793a36d1333091561870dfa97c6fd | |
| parent | 22888798d224f96202480595fc49bc5c4b2f8328 (diff) | |
| download | haskell-288d65eb2243a50914def9abbee042a1429e18df.tar.gz | |
nativeGen: Make makeImportsDoc take an NCGConfig rather than DynFlags
It appears this was an oversight as there is no reason the full DynFlags
is necessary.
| -rw-r--r-- | compiler/GHC/CmmToAsm.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs index 09ff24e96f..d051baf782 100644 --- a/compiler/GHC/CmmToAsm.hs +++ b/compiler/GHC/CmmToAsm.hs @@ -290,7 +290,7 @@ finishNativeGen dflags config modLoc bufh@(BufHandle _ _ h) us ngs -- write out the imports let ctx = ncgAsmContext config printSDocLn ctx Pretty.LeftMode h - $ makeImportsDoc dflags (concat (ngs_imports ngs)) + $ makeImportsDoc config (concat (ngs_imports ngs)) return us' where dump_stats = dumpAction dflags (mkDumpStyle alwaysQualify) @@ -750,8 +750,8 @@ computeUnwinding _ ncgImpl (CmmProc _ _ _ (ListGraph blks)) = -- | Build a doc for all the imports. -- -makeImportsDoc :: DynFlags -> [CLabel] -> SDoc -makeImportsDoc dflags imports +makeImportsDoc :: NCGConfig -> [CLabel] -> SDoc +makeImportsDoc config imports = dyld_stubs imports $$ -- On recent versions of Darwin, the linker supports @@ -779,7 +779,6 @@ makeImportsDoc dflags imports else Outputable.empty) where - config = initNCGConfig dflags platform = ncgPlatform config -- Generate "symbol stubs" for all external symbols that might |
