Skip to content

Commit

Permalink
[project @ 2004-03-11 09:53:45 by simonmar]
Browse files Browse the repository at this point in the history
Add dependency on GHC.TopHandler if this is the main module.
  • Loading branch information
simonmar committed Mar 11, 2004
1 parent 1ee6cec commit 4fc797a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ghc/compiler/codeGen/CodeGen.lhs
Expand Up @@ -28,7 +28,7 @@ import DriverState ( v_Build_tag, v_MainModIs )
import StgSyn
import CgMonad
import AbsCSyn
import PrelNames ( gHC_PRIM, rOOT_MAIN, mAIN_Name )
import PrelNames ( gHC_PRIM, rOOT_MAIN, mAIN_Name, pREL_TOP_HANDLER )
import CLabel ( mkSRTLabel, mkClosureLabel,
mkPlainModuleInitLabel, mkModuleInitLabel )
import PprAbsC ( dumpRealC )
Expand Down Expand Up @@ -145,7 +145,12 @@ mkModuleInit way cost_centre_info this_mod mb_main_mod foreign_stubs imported_mo
CLbl (mkModuleInitLabel mod way) AddrRep
]
register_mod_imports = map mk_import_register imported_mods
extra_imported_mods
| Module.moduleName this_mod == main_mod_name = [ pREL_TOP_HANDLER ]
| otherwise = [ ]
register_mod_imports =
map mk_import_register (imported_mods ++ extra_imported_mods)
-- When compiling the module in which the 'main' function lives,
-- we inject an extra stg_init procedure for stg_init_ZCMain, for the
Expand Down

0 comments on commit 4fc797a

Please sign in to comment.