opt_IgnoreDotGhci,
opt_ErrorSpans,
opt_EmitCExternDecls,
- opt_SplitObjs,
opt_GranMacros,
opt_HiVersion,
opt_HistorySize,
#include "HsVersions.h"
-import DriverPhases
import Util ( consIORef )
import CmdLineParser
import Config ( cProjectVersionInt, cProjectPatchLevel,
import UNSAFE_IO ( unsafePerformIO )
import Monad ( when )
import Char ( isDigit )
-import IO ( hPutStrLn, stderr ) -- ToDo: should use errorMsg
import List ( sort, intersperse )
-----------------------------------------------------------------------------
------- Miscellaneous -----------------------------------------------
, ( "no-link-chk" , NoArg (return ()) ) -- ignored for backwards compat
- , ( "split-objs" , NoArg (if can_split
- then addOpt "-split-objs"
- else hPutStrLn stderr
- "warning: don't know how to split object files on this architecture"
- ) )
-
----- Linker --------------------------------------------------------
, ( "static" , PassFlag addOpt )
, ( "dynamic" , NoArg (removeOpt "-static") )
opt_MaxWorkerArgs = lookup_def_int "-fmax-worker-args" (10::Int)
opt_EmitCExternDecls = lookUp FSLIT("-femit-extern-decls")
-opt_SplitObjs = lookUp FSLIT("-split-objs")
opt_GranMacros = lookUp FSLIT("-fgransim")
opt_HiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Int
opt_HistorySize = lookup_def_int "-fhistory-size" 20
foreign import "enableTimingStats" unsafe enableTimingStats :: IO ()
#endif
--- -----------------------------------------------------------------------------
--- Splitting
-
-can_split :: Bool
-can_split =
-#if defined(i386_TARGET_ARCH) \
- || defined(alpha_TARGET_ARCH) \
- || defined(hppa_TARGET_ARCH) \
- || defined(m68k_TARGET_ARCH) \
- || defined(mips_TARGET_ARCH) \
- || defined(powerpc_TARGET_ARCH) \
- || defined(rs6000_TARGET_ARCH) \
- || defined(sparc_TARGET_ARCH)
- True
-#else
- False
-#endif
-
-----------------------------------------------------------------------------
-- Ways
(WayProf, Way "p" False "Profiling"
[ "-fscc-profiling"
, "-DPROFILING"
- , "-optc-DPROFILING"
- , "-fvia-C" ]),
+ , "-optc-DPROFILING" ]),
(WayTicky, Way "t" False "Ticky-ticky Profiling"
[ "-fticky-ticky"
, "-DTICKY_TICKY"
- , "-optc-DTICKY_TICKY"
- , "-fvia-C" ]),
+ , "-optc-DTICKY_TICKY" ]),
(WayUnreg, Way "u" False "Unregisterised"
unregFlags ),
, "-optc-w"
, "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}"
, "-optl-lpvm3"
- , "-optl-lgpvm3"
- , "-fvia-C" ]),
+ , "-optl-lgpvm3" ]),
-- at the moment we only change the RTS and could share compiler and libs!
(WayPar, Way "mt" False "Parallel ticky profiling"
, "-optc-w"
, "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}"
, "-optl-lpvm3"
- , "-optl-lgpvm3"
- , "-fvia-C" ]),
+ , "-optl-lgpvm3" ]),
(WayPar, Way "md" False "Distributed"
[ "-fparallel"
, "-optc-w"
, "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}"
, "-optl-lpvm3"
- , "-optl-lgpvm3"
- , "-fvia-C" ]),
+ , "-optl-lgpvm3" ]),
(WayGran, Way "mg" False "GranSim"
[ "-fgransim"
, "-D__GRANSIM__"
, "-optc-DGRAN"
- , "-package concurrent"
- , "-fvia-C" ]),
+ , "-package concurrent" ]),
(WaySMP, Way "s" False "SMP"
[ "-fsmp"
+#if !defined(mingw32_TARGET_OS)
, "-optc-pthread"
-#ifndef freebsd_TARGET_OS
+#endif
+#if !defined(mingw32_TARGET_OS) && !defined(freebsd_TARGET_OS)
, "-optl-pthread"
#endif
- , "-optc-DSMP"
- , "-fvia-C" ]),
+ , "-optc-DSMP" ]),
(WayNDP, Way "ndp" False "Nested data parallelism"
[ "-fparr"