Commit 1d34bd56 authored by Simon Marlow's avatar Simon Marlow
Browse files

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.
parent fefeca98
...@@ -64,7 +64,9 @@ module DynFlags ( ...@@ -64,7 +64,9 @@ module DynFlags (
#include "HsVersions.h" #include "HsVersions.h"
#ifndef OMIT_NATIVE_CODEGEN
import Platform import Platform
#endif
import Module import Module
import PackageConfig import PackageConfig
import PrelNames ( mAIN, main_RDR_Unqual ) import PrelNames ( mAIN, main_RDR_Unqual )
...@@ -340,7 +342,9 @@ data DynFlags = DynFlags { ...@@ -340,7 +342,9 @@ data DynFlags = DynFlags {
specConstrCount :: Maybe Int, -- ^ Max number of specialisations for any one function specConstrCount :: Maybe Int, -- ^ Max number of specialisations for any one function
liberateCaseThreshold :: Maybe Int, -- ^ Threshold for LiberateCase liberateCaseThreshold :: Maybe Int, -- ^ Threshold for LiberateCase
#ifndef OMIT_NATIVE_CODEGEN
targetPlatform :: Platform, -- ^ The platform we're compiling for. Used by the NCG. targetPlatform :: Platform, -- ^ The platform we're compiling for. Used by the NCG.
#endif
stolen_x86_regs :: Int, stolen_x86_regs :: Int,
cmdlineHcIncludes :: [String], -- ^ @\-\#includes@ cmdlineHcIncludes :: [String], -- ^ @\-\#includes@
importPaths :: [FilePath], importPaths :: [FilePath],
...@@ -586,7 +590,9 @@ defaultDynFlags = ...@@ -586,7 +590,9 @@ defaultDynFlags =
specConstrThreshold = Just 200, specConstrThreshold = Just 200,
specConstrCount = Just 3, specConstrCount = Just 3,
liberateCaseThreshold = Just 200, liberateCaseThreshold = Just 200,
#ifndef OMIT_NATIVE_CODEGEN
targetPlatform = defaultTargetPlatform, targetPlatform = defaultTargetPlatform,
#endif
stolen_x86_regs = 4, stolen_x86_regs = 4,
cmdlineHcIncludes = [], cmdlineHcIncludes = [],
importPaths = ["."], importPaths = ["."],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment