diff options
author | Divam <dfordivam@gmail.com> | 2021-06-10 17:21:31 +0900 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-06-16 20:20:59 -0400 |
commit | 34484c89ac1a5f037ec7f423c72d3cb4b830b831 (patch) | |
tree | d8a57e42fb56d4a9c7afefaa57f642e4880c85e5 | |
parent | d8bfebec6340ee5e1aa6f1731d5c4b91d8377fdb (diff) | |
download | haskell-34484c89ac1a5f037ec7f423c72d3cb4b830b831.tar.gz |
Remove the backend correction logic, as it is already been fixed at this point
-rw-r--r-- | compiler/GHC/Driver/Make.hs | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs index c46d83224f..9a14fc449d 100644 --- a/compiler/GHC/Driver/Make.hs +++ b/compiler/GHC/Driver/Make.hs @@ -1532,32 +1532,7 @@ upsweep_mod :: HscEnv -> IO HomeModInfo upsweep_mod hsc_env mHscMessage old_hpt summary mod_index nmods = let - this_mod_name = ms_mod_name summary - - old_hmi = lookupHpt old_hpt this_mod_name - - -- We're using the dflags for this module now, obtained by - -- applying any options in its LANGUAGE & OPTIONS_GHC pragmas. - lcl_dflags = ms_hspp_opts summary - prevailing_backend = backend (hsc_dflags hsc_env) - local_backend = backend lcl_dflags - - -- If OPTIONS_GHC contains -fasm or -fllvm, be careful that - -- we don't do anything dodgy: these should only work to change - -- from -fllvm to -fasm and vice-versa, or away from -fno-code, - -- otherwise we could end up trying to link object code to byte - -- code. - bcknd = case (prevailing_backend,local_backend) of - (LLVM,NCG) -> NCG - (NCG,LLVM) -> LLVM - (NoBackend,b) - | backendProducesObject b -> b - (Interpreter,b) - | backendProducesObject b -> b - _ -> prevailing_backend - - -- store the corrected backend into the summary - summary' = summary{ ms_hspp_opts = lcl_dflags { backend = bcknd } } + old_hmi = lookupHpt old_hpt (ms_mod_name summary) -- The old interface is ok if -- a) we're compiling a source file, and the old HPT @@ -1579,7 +1554,7 @@ upsweep_mod hsc_env mHscMessage old_hpt summary mod_index nmods compile_it :: Maybe Linkable -> IO HomeModInfo compile_it mb_linkable = - compileOne' Nothing mHscMessage hsc_env summary' mod_index nmods + compileOne' Nothing mHscMessage hsc_env summary mod_index nmods mb_old_iface mb_linkable in |