diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-09-22 10:10:35 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-19 03:30:16 -0400 |
commit | 837ce6cf607317b4462c0d77a640eb1b35b3db5a (patch) | |
tree | db53e93643bb6dc92c6d7e0674bd04145e8cdb8f /compiler | |
parent | d25868b6dc4e4bfaf6977ef4173b7f5494e68f13 (diff) | |
download | haskell-837ce6cf607317b4462c0d77a640eb1b35b3db5a.tar.gz |
driver: Check the correct flag to see if dynamic-too is enabled.
We just need to check the flag here rather than read the variable which
indicates whether dynamic-too compilation has failed.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Driver/Main.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs index 3605b4ac5a..9aeb04e336 100644 --- a/compiler/GHC/Driver/Main.hs +++ b/compiler/GHC/Driver/Main.hs @@ -733,8 +733,8 @@ hscRecompStatus -- or not. checkObjects :: DynFlags -> Maybe Linkable -> ModSummary -> IO (RecompileRequired, Maybe Linkable) checkObjects dflags mb_old_linkable summary = do - dt_state <- dynamicTooState dflags let + dt_enabled = gopt Opt_BuildDynamicToo dflags this_mod = ms_mod summary mb_obj_date = ms_obj_date summary mb_dyn_obj_date = ms_dyn_obj_date summary @@ -743,12 +743,12 @@ checkObjects dflags mb_old_linkable summary = do -- dynamic-too *also* produces the dyn_o_file, so have to check -- that's there, and if it's not, regenerate both .o and -- .dyn_o - checkDynamicObj k = case dt_state of - DT_OK -> case (>=) <$> mb_dyn_obj_date <*> mb_if_date of + checkDynamicObj k = if dt_enabled + then case (>=) <$> mb_dyn_obj_date <*> mb_if_date of Just True -> k _ -> return (RecompBecause MissingDynObjectFile, Nothing) -- Not in dynamic-too mode - _ -> k + else k checkDynamicObj $ case (,) <$> mb_obj_date <*> mb_if_date of |