Commit 066b369d authored by Ian Lynagh's avatar Ian Lynagh

Remove the OMIT_NATIVE_CODEGEN ifdef

We now test
    cGhcWithNativeCodeGen == "YES"
instead.
parent 8fc75d3c
......@@ -850,8 +850,8 @@ instance Outputable CLabel where
pprCLabel :: CLabel -> SDoc
#if ! OMIT_NATIVE_CODEGEN
pprCLabel (AsmTempLabel u)
| cGhcWithNativeCodeGen == "YES"
= getPprStyle $ \ sty ->
if asmStyle sty then
ptext asmTempLabelPrefix <> pprUnique u
......@@ -859,23 +859,22 @@ pprCLabel (AsmTempLabel u)
char '_' <> pprUnique u
pprCLabel (DynamicLinkerLabel info lbl)
| cGhcWithNativeCodeGen == "YES"
= pprDynamicLinkerAsmLabel info lbl
pprCLabel PicBaseLabel
| cGhcWithNativeCodeGen == "YES"
= ptext (sLit "1b")
pprCLabel (DeadStripPreventer lbl)
| cGhcWithNativeCodeGen == "YES"
= pprCLabel lbl <> ptext (sLit "_dsp")
#endif
pprCLabel lbl =
#if ! OMIT_NATIVE_CODEGEN
getPprStyle $ \ sty ->
if asmStyle sty then
maybe_underscore (pprAsmCLbl lbl)
else
#endif
pprCLbl lbl
pprCLabel lbl
= getPprStyle $ \ sty ->
if cGhcWithNativeCodeGen == "YES" && asmStyle sty
then maybe_underscore (pprAsmCLbl lbl)
else pprCLbl lbl
maybe_underscore doc
| underscorePrefix = pp_cSEP <> doc
......
......@@ -36,11 +36,6 @@ Flag ghci
Default: False
Manual: True
Flag ncg
Description: Build the NCG.
Default: False
Manual: True
Flag stage1
Description: Is this stage 1?
Default: False
......@@ -88,9 +83,6 @@ Library
CPP-Options: -DGHCI
Include-Dirs: ../libffi/build/include
if !flag(ncg)
CPP-Options: -DOMIT_NATIVE_CODEGEN
Build-Depends: bin-package-db
Build-Depends: hoopl
......@@ -490,10 +482,7 @@ Library
Vectorise.Exp
Vectorise
-- We only need to expose more modules as some of the ncg code is used
-- by the LLVM backend so its always included
if flag(ncg)
Exposed-Modules:
Exposed-Modules:
AsmCodeGen
TargetReg
NCGMonad
......
......@@ -423,12 +423,6 @@ endif
endif
ifeq "$(GhcWithNativeCodeGen)" "NO"
# XXX This should logically be a CPP option, but there doesn't seem to
# be a flag for that
compiler_CONFIGURE_OPTS += --ghc-option=-DOMIT_NATIVE_CODEGEN
endif
ifeq "$(TargetOS_CPP)" "openbsd"
compiler_CONFIGURE_OPTS += --ld-options=-E
endif
......
......@@ -8,9 +8,7 @@ module CodeOutput( codeOutput, outputForeignStubs ) where
#include "HsVersions.h"
#ifndef OMIT_NATIVE_CODEGEN
import AsmCodeGen ( nativeCodeGen )
#endif
import AsmCodeGen ( nativeCodeGen )
import LlvmCodeGen ( llvmCodeGen )
import UniqSupply ( mkSplitUniqSupply )
......@@ -149,24 +147,17 @@ outputC dflags filenm flat_absC packages
\begin{code}
outputAsm :: DynFlags -> FilePath -> [RawCmm] -> IO ()
#ifndef OMIT_NATIVE_CODEGEN
outputAsm dflags filenm flat_absC
| cGhcWithNativeCodeGen == "YES"
= do ncg_uniqs <- mkSplitUniqSupply 'n'
{-# SCC "OutputAsm" #-} doOutput filenm $
\f -> {-# SCC "NativeCodeGen" #-}
nativeCodeGen dflags f ncg_uniqs flat_absC
where
\f -> {-# SCC "NativeCodeGen" #-}
nativeCodeGen dflags f ncg_uniqs flat_absC
#else /* OMIT_NATIVE_CODEGEN */
outputAsm _ _ _
| otherwise
= pprPanic "This compiler was built without a native code generator"
(text "Use -fvia-C instead")
#endif
(text "Use -fvia-C instead")
\end{code}
......
......@@ -77,9 +77,7 @@ module DynFlags (
#include "HsVersions.h"
#ifndef OMIT_NATIVE_CODEGEN
import Platform
#endif
import Module
import PackageConfig
import PrelNames ( mAIN )
......@@ -402,9 +400,7 @@ data DynFlags = DynFlags {
floatLamArgs :: Maybe Int, -- ^ Arg count for lambda floating
-- See CoreMonad.FloatOutSwitches
#ifndef OMIT_NATIVE_CODEGEN
targetPlatform :: Platform.Platform, -- ^ The platform we're compiling for. Used by the NCG.
#endif
cmdlineHcIncludes :: [String], -- ^ @\-\#includes@
importPaths :: [FilePath],
mainModIs :: Module,
......@@ -749,9 +745,7 @@ defaultDynFlags mySettings =
floatLamArgs = Just 0, -- Default: float only if no fvs
strictnessBefore = [],
#ifndef OMIT_NATIVE_CODEGEN
targetPlatform = defaultTargetPlatform,
#endif
cmdlineHcIncludes = [],
importPaths = ["."],
mainModIs = mAIN,
......
Markdown is supported
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