From fcfda909fd7fcf539ff31717ce01a56292abb92f Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Mon, 26 Oct 2020 14:55:47 -0400 Subject: 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. --- compiler/GHC/CmmToAsm.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'compiler/GHC/CmmToAsm.hs') 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 -- cgit v1.2.1