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)
import StaticFlags ( opt_Static )
#endif
import StaticFlags ( opt_PIC, WayName(..), v_Ways, v_Build_tag,
-- 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
})
| otherwise
= []
#else
- | opt_PIC
+ | opt_PIC || not opt_Static
= ["-fPIC", "-U __PIC__", "-D__PIC__"]
| otherwise
= []