diff options
-rw-r--r-- | compiler/main/GhcMake.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs index 910e1f6508..9fb4287837 100644 --- a/compiler/main/GhcMake.hs +++ b/compiler/main/GhcMake.hs @@ -560,7 +560,8 @@ checkStability hpt sccs all_home_mods = foldl checkSCC ([],[]) sccs && all bco_ok scc object_ok ms - | Just t <- ms_obj_date ms = t >= ms_hs_date ms + | dopt Opt_ForceRecomp (ms_hspp_opts ms) = False + | Just t <- ms_obj_date ms = t >= ms_hs_date ms && same_as_prev t | otherwise = False where @@ -579,7 +580,8 @@ checkStability hpt sccs all_home_mods = foldl checkSCC ([],[]) sccs -- a problem. bco_ok ms - = case lookupUFM hpt (ms_mod_name ms) of + | dopt Opt_ForceRecomp (ms_hspp_opts ms) = False + | otherwise = case lookupUFM hpt (ms_mod_name ms) of Just hmi | Just l <- hm_linkable hmi -> not (isObjectLinkable l) && linkableTime l >= ms_hs_date ms |