X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDynFlags.hs;h=50fd2cf9cb4b5ca293adfc58d5a75b0a2c144480;hb=d282b3c7ff1c950023206b50a480cc8a285dae12;hp=47cc3fe1f58f6e6a3c7dc63d609e2cde5e3c5345;hpb=eaeca51efc0be3ff865c4530137bfbe9f8553549;p=ghc-hetmet.git diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 47cc3fe..50fd2cf 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -72,7 +72,7 @@ import PackageConfig import PrelNames ( mAIN, main_RDR_Unqual ) import RdrName ( RdrName, mkRdrUnqual ) import OccName ( mkVarOccFS ) -#ifdef i386_TARGET_ARCH +#if defined(i386_TARGET_ARCH) || (!defined(mingw32_TARGET_OS) && !defined(darwin_TARGET_OS)) import StaticFlags ( opt_Static ) #endif import StaticFlags ( opt_PIC, WayName(..), v_Ways, v_Build_tag, @@ -1809,6 +1809,8 @@ impliedFlags -- be completely rigid for GADTs , (Opt_TypeFamilies, Opt_RelaxedPolyRec) -- Trac #2944 gives a nice example + , (Opt_TypeFamilies, Opt_KindSignatures) -- Type families use kind signatures + -- all over the place , (Opt_ScopedTypeVariables, Opt_RelaxedPolyRec) -- Ditto for scoped type variables; see -- Note [Scoped tyvars] in TcBinds @@ -2039,12 +2041,15 @@ setOptLevel n dflags -- sometimes -- -fdicts-cheap always inline dictionaries -- -fmax-simplifier-iterations20 this is necessary sometimes +-- -fsimplifier-phases=3 we use an additional simplifier phase +-- for fusion -- -fno-spec-constr-threshold run SpecConstr even for big loops -- -fno-spec-constr-count SpecConstr as much as possible -- -finline-enough-args hack to prevent excessive inlining -- setDPHOpt :: DynFlags -> DynFlags setDPHOpt dflags = setOptLevel 2 (dflags { maxSimplIterations = 20 + , simplPhases = 3 , specConstrThreshold = Nothing , specConstrCount = Nothing }) @@ -2253,7 +2258,13 @@ machdepCCOpts _dflags = ( [], ["-fomit-frame-pointer", "-G0"] ) #elif x86_64_TARGET_ARCH - = ( [], ["-fomit-frame-pointer", + = ( +#if darwin_TARGET_OS + ["-m64"], +#else + [], +#endif + ["-fomit-frame-pointer", "-fno-asynchronous-unwind-tables", -- the unwind tables are unnecessary for HC code, -- and get in the way of -split-objs. Another option @@ -2277,6 +2288,8 @@ machdepCCOpts _dflags -- for "normal" programs, but it doesn't support register variable -- declarations. = ( [], ["-no-cpp-precomp"] ) +#elif x86_64_apple_darwin_TARGET + = ( ["-m64"], [] ) #else = ( [], [] ) #endif @@ -2303,7 +2316,7 @@ picCCOpts _dflags | otherwise = [] #else - | opt_PIC + | opt_PIC || not opt_Static = ["-fPIC", "-U __PIC__", "-D__PIC__"] | otherwise = []