From d63d877c7735b8f0dc6646e5c5b034dff7e6b591 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 16 Jan 2001 12:41:03 +0000 Subject: [PATCH] [project @ 2001-01-16 12:41:03 by simonmar] take account of GhcUnregisterised --- ghc/compiler/main/DriverState.hs | 15 +++++++++------ ghc/compiler/main/Main.hs | 12 ++++++++---- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ghc/compiler/main/DriverState.hs b/ghc/compiler/main/DriverState.hs index 70a80b8..b462da8 100644 --- a/ghc/compiler/main/DriverState.hs +++ b/ghc/compiler/main/DriverState.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverState.hs,v 1.23 2001/01/12 11:04:45 simonmar Exp $ +-- $Id: DriverState.hs,v 1.24 2001/01/16 12:41:03 simonmar Exp $ -- -- Settings for the driver -- @@ -602,11 +602,7 @@ way_details = , "-fvia-C" ]), (WayUnreg, Way "u" "Unregisterised" - [ "-optc-DNO_REGS" - , "-optc-DUSE_MINIINTERPRETER" - , "-fno-asm-mangling" - , "-funregisterised" - , "-fvia-C" ]), + unregFlags ), (WayPar, Way "mp" "Parallel" [ "-fparallel" @@ -648,6 +644,13 @@ way_details = (WayUser_B, Way "B" "User way 'B'" ["$WAY_B_REAL_OPTS"]) ] +unregFlags = + [ "-optc-DNO_REGS" + , "-optc-DUSE_MINIINTERPRETER" + , "-fno-asm-mangling" + , "-funregisterised" + , "-fvia-C" ] + ----------------------------------------------------------------------------- -- Programs for particular phases diff --git a/ghc/compiler/main/Main.hs b/ghc/compiler/main/Main.hs index a3ad516..e2a863b 100644 --- a/ghc/compiler/main/Main.hs +++ b/ghc/compiler/main/Main.hs @@ -1,6 +1,6 @@ {-# OPTIONS -fno-warn-incomplete-patterns #-} ----------------------------------------------------------------------------- --- $Id: Main.hs,v 1.46 2001/01/12 11:04:45 simonmar Exp $ +-- $Id: Main.hs,v 1.47 2001/01/16 12:41:03 simonmar Exp $ -- -- GHC Driver program -- @@ -168,9 +168,13 @@ main = -- process all the other arguments, and get the source files non_static <- processArgs static_flags flags2 [] - -- find the build tag, and re-process the build-specific options - more_opts <- findBuildTag - way_non_static <- processArgs static_flags more_opts [] + -- Find the build tag, and re-process the build-specific options. + -- Also add in flags for unregisterised compilation, if + -- GhcUnregisterised=YES. + way_opts <- findBuildTag + let unreg_opts | cGhcUnregisterised == "YES" = unregFlags + | otherwise = [] + way_non_static <- processArgs static_flags (unreg_opts ++ way_opts) [] -- give the static flags to hsc static_opts <- buildStaticHscOpts -- 1.7.10.4