X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDriverPipeline.hs;h=7822d6713e493b68cbe992c6740f5c48bc257ecb;hb=8604da0136707cc14845d14a88c2272fe576b6d0;hp=1f81249f689052fb1f35a8723cf8e838ab8387fc;hpb=448873c017b64b4343f695925b4470fa21e216f5;p=ghc-hetmet.git diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 1f81249..7822d67 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -32,7 +32,7 @@ import Finder import HscTypes import Outputable import Module -import UniqFM ( eltsUFM ) +import LazyUniqFM ( eltsUFM ) import ErrUtils import DynFlags import StaticFlags ( v_Ld_inputs, opt_Static, WayName(..) ) @@ -45,6 +45,7 @@ import Maybes ( expectJust ) import ParserCoreUtils ( getCoreModuleName ) import SrcLoc ( unLoc ) import SrcLoc ( Located(..) ) +import FastString import Control.Exception as Exception import Data.IORef ( readIORef, writeIORef, IORef ) @@ -304,11 +305,11 @@ link LinkBinary dflags batch_attempt_linking hpt Right t -> any (t <) other_times if not (dopt Opt_ForceRecomp dflags) && not linking_needed - then do debugTraceMsg dflags 2 (text exe_file <+> ptext SLIT("is up to date, linking not required.")) + then do debugTraceMsg dflags 2 (text exe_file <+> ptext (sLit "is up to date, linking not required.")) return Succeeded else do - debugTraceMsg dflags 1 (ptext SLIT("Linking") <+> text exe_file + debugTraceMsg dflags 1 (ptext (sLit "Linking") <+> text exe_file <+> text "...") -- Don't showPass in Batch mode; doLink will do that for us. @@ -835,6 +836,13 @@ runPhase cc_phase _stop dflags _basename _suff input_fn get_output_fn maybe_loc pkg_extra_cc_opts <- getPackageExtraCcOpts dflags pkgs +#ifdef darwin_TARGET_OS + pkg_framework_paths <- getPackageFrameworkPath dflags pkgs + let cmdline_framework_paths = frameworkPaths dflags + let framework_paths = map ("-F"++) + (cmdline_framework_paths ++ pkg_framework_paths) +#endif + let split_objs = dopt Opt_SplitObjs dflags split_opt | hcc && split_objs = [ "-DUSE_SPLIT_MARKERS" ] | otherwise = [ ] @@ -907,6 +915,9 @@ runPhase cc_phase _stop dflags _basename _suff input_fn get_output_fn maybe_loc else []) ++ [ verb, "-S", "-Wimplicit", cc_opt ] ++ [ "-D__GLASGOW_HASKELL__="++cProjectVersionInt ] +#ifdef darwin_TARGET_OS + ++ framework_paths +#endif ++ cc_opts ++ split_opt ++ include_paths @@ -1615,6 +1626,5 @@ hscMaybeAdjustTarget dflags stop _ current_hsc_lang -- otherwise, stick to the plan | otherwise = current_hsc_lang -v_Split_info :: IORef (String, Int) GLOBAL_VAR(v_Split_info, ("",0), (String,Int)) -- The split prefix and number of files