X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDriverPipeline.hs;h=b848e830e6b88d6ca6dbbf1518b8a4f2ff781d55;hb=48b6c777e2e84cc42a27a50642bcb41a0bd2c1d7;hp=7c515fe80616322f583b20b46508779d190da21d;hpb=59e7d08db602d243d3768ce6907e7bfe67a55e1a;p=ghc-hetmet.git diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 7c515fe..b848e83 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -53,7 +53,7 @@ import GHC.Exts ( Int(..) ) import System.Directory import System.FilePath import System.IO -import SYSTEM_IO_ERROR as IO +import System.IO.Error as IO import Control.Monad import Data.List ( isSuffixOf ) import Data.Maybe @@ -130,7 +130,7 @@ compile hsc_env0 summary mod_index nmods mb_old_iface maybe_old_linkable extCoreName = basename ++ ".hcr" } let hsc_env' = hsc_env { hsc_dflags = dflags' } - -- -no-recomp should also work with --make + -- -fforce-recomp should also work with --make let force_recomp = dopt Opt_ForceRecomp dflags source_unchanged = isJust maybe_old_linkable && not force_recomp object_filename = ml_obj_file location @@ -295,7 +295,7 @@ link LinkBinary dflags batch_attempt_linking hpt -- if the modification time on the executable is later than the -- modification times on all of the objects, then omit linking - -- (unless the -no-recomp flag was given). + -- (unless the -fforce-recomp flag was given). e_exe_time <- IO.try $ getModificationTime exe_file extra_ld_inputs <- readIORef v_Ld_inputs extra_times <- mapM (IO.try . getModificationTime) extra_ld_inputs @@ -614,7 +614,8 @@ runPhase (Unlit sf) _stop hsc_env _basename _suff input_fn get_output_fn maybe_l runPhase (Cpp sf) _stop hsc_env basename suff input_fn get_output_fn maybe_loc = do let dflags0 = hsc_dflags hsc_env src_opts <- getOptionsFromFile dflags0 input_fn - (dflags,unhandled_flags) <- parseDynamicFlags dflags0 (map unLoc src_opts) + (dflags, unhandled_flags, warns) <- parseDynamicFlags dflags0 (map unLoc src_opts) + handleFlagWarnings dflags warns checkProcessArgsResult unhandled_flags (basename <.> suff) if not (dopt Opt_Cpp dflags) then @@ -1213,17 +1214,6 @@ mk_pvm_wrapper_script pvm_executable pvm_executable_base sysMan = unlines $ ] ----------------------------------------------------------------------------- --- Complain about non-dynamic flags in OPTIONS pragmas - -checkProcessArgsResult :: [String] -> FilePath -> IO () -checkProcessArgsResult flags filename - = do when (notNull flags) (throwDyn (ProgramError ( - showSDoc (hang (text filename <> char ':') - 4 (text "unknown flags in {-# OPTIONS #-} pragma:" <+> - hsep (map text flags))) - ))) - ------------------------------------------------------------------------------ -- Look for the /* GHC_PACKAGES ... */ comment at the top of a .hc file getHCFilePackages :: FilePath -> IO [PackageId]