summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-03-18 15:12:55 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-03-18 15:12:55 +0000
commit1d34bd56c9dde4dad72d3e8a4cfabdf11337dfb3 (patch)
tree7e62836d0277190b4ea6393a1856a83a7b812a44
parentfefeca989f9fb9b3fbf2be146a303b1b481097f7 (diff)
downloadhaskell-1d34bd56c9dde4dad72d3e8a4cfabdf11337dfb3.tar.gz
FIX unregisterised target by #ifdefing targetPlatform stuff
I'm not sure if this is the correct fix. If targetPlatform is really NCG-specific, then maybe we should call it asmTargetPlatform or something.
-rw-r--r--compiler/main/DynFlags.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index eb9a182997..e3fd4267f1 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -64,7 +64,9 @@ module DynFlags (
#include "HsVersions.h"
+#ifndef OMIT_NATIVE_CODEGEN
import Platform
+#endif
import Module
import PackageConfig
import PrelNames ( mAIN, main_RDR_Unqual )
@@ -340,7 +342,9 @@ data DynFlags = DynFlags {
specConstrCount :: Maybe Int, -- ^ Max number of specialisations for any one function
liberateCaseThreshold :: Maybe Int, -- ^ Threshold for LiberateCase
+#ifndef OMIT_NATIVE_CODEGEN
targetPlatform :: Platform, -- ^ The platform we're compiling for. Used by the NCG.
+#endif
stolen_x86_regs :: Int,
cmdlineHcIncludes :: [String], -- ^ @\-\#includes@
importPaths :: [FilePath],
@@ -586,7 +590,9 @@ defaultDynFlags =
specConstrThreshold = Just 200,
specConstrCount = Just 3,
liberateCaseThreshold = Just 200,
+#ifndef OMIT_NATIVE_CODEGEN
targetPlatform = defaultTargetPlatform,
+#endif
stolen_x86_regs = 4,
cmdlineHcIncludes = [],
importPaths = ["."],