[project @ 2005-01-28 12:55:17 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / CmdLineOpts.lhs
index 5fbf20d..2d4b4e9 100644 (file)
@@ -90,7 +90,7 @@ module CmdLineOpts (
 #include "HsVersions.h"
 
 import {-# SOURCE #-} Packages (PackageState)
-import DriverPhases    ( HscTarget(..), HscSource(..) )
+import DriverPhases    ( HscTarget(..) )
 import Constants       -- Default values for some flags
 import Util
 import FastString      ( FastString, mkFastString )
@@ -306,6 +306,7 @@ data DynFlags = DynFlags {
   ruleCheck            :: Maybe String,
   cppFlag              :: Bool,        -- preprocess with cpp?
   ppFlag                :: Bool,        -- preprocess with a Haskell Pp?
+  recompFlag           :: Bool,        -- True <=> recompilation checker is on
   stolen_x86_regs      :: Int,         
   cmdlineHcIncludes    :: [String],    -- -#includes
   importPaths          :: [FilePath],
@@ -347,11 +348,10 @@ data PackageFlag
   | IgnorePackage  String
 
 defaultHscTarget
-  | cGhcWithNativeCodeGen == "YES" && 
-       (prefixMatch "i386" cTARGETPLATFORM ||
-        prefixMatch "sparc" cTARGETPLATFORM ||
-        prefixMatch "powerpc" cTARGETPLATFORM) =  HscAsm
-  | otherwise                                  =  HscC
+#if defined(i386_TARGET_ARCH) || defined(sparc_TARGET_ARCH) || defined(powerpc_TARGET_ARCH)
+  | cGhcWithNativeCodeGen == "YES"     =  HscAsm
+#endif
+  | otherwise                          =  HscC
 
 defaultDynFlags = DynFlags {
   coreToDo = Nothing, stgToDo = [], 
@@ -365,6 +365,7 @@ defaultDynFlags = DynFlags {
   ruleCheck            = Nothing,
   cppFlag              = False,
   ppFlag                = False,
+  recompFlag           = True,
   stolen_x86_regs      = 4,
   cmdlineHcIncludes    = [],
   importPaths          = ["."],