Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/b3199f6977fdaed6f3f898aee14bd0af61140cf5 >--------------------------------------------------------------- commit b3199f6977fdaed6f3f898aee14bd0af61140cf5 Author: Edward Z. Yang <ezy...@mit.edu> Date: Mon Apr 4 12:56:00 2011 +0100 Flag for defaulting the codegen GhcStageXDefaultNewCodegen. Signed-off-by: Edward Z. Yang <ezy...@mit.edu> >--------------------------------------------------------------- compiler/ghc.mk | 12 ++++++++++++ compiler/main/DynFlags.hs | 4 ++++ mk/config.mk.in | 10 ++++++++++ 3 files changed, 26 insertions(+), 0 deletions(-) diff --git a/compiler/ghc.mk b/compiler/ghc.mk index 357b51c..48a802a 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -491,6 +491,18 @@ compiler_stage1_HC_OPTS += $(GhcStage1HcOpts) compiler_stage2_HC_OPTS += $(GhcStage2HcOpts) compiler_stage3_HC_OPTS += $(GhcStage3HcOpts) +ifeq "$(GhcStage1DefaultNewCodegen)" "YES" +compiler_stage1_HC_OPTS += -DGHC_DEFAULT_NEW_CODEGEN +endif + +ifeq "$(GhcStage2DefaultNewCodegen)" "YES" +compiler_stage2_HC_OPTS += -DGHC_DEFAULT_NEW_CODEGEN +endif + +ifeq "$(GhcStage3DefaultNewCodegen)" "YES" +compiler_stage3_HC_OPTS += -DGHC_DEFAULT_NEW_CODEGEN +endif + ifneq "$(BINDIST)" "YES" compiler_stage2_TAGS_HC_OPTS = -package ghc diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index c7a7b02..9f504a1 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -1646,6 +1646,10 @@ defaultFlags Opt_SharedImplib, +#if GHC_DEFAULT_NEW_CODEGEN + Opt_TryNewCodeGen, +#endif + Opt_GenManifest, Opt_EmbedManifest, Opt_PrintBindContents, diff --git a/mk/config.mk.in b/mk/config.mk.in index e5b6811..10911e6 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -97,6 +97,16 @@ GhcStage1HcOpts= GhcStage2HcOpts=-O2 GhcStage3HcOpts=-O2 +# These options modify whether or not a built compiler for a bootstrap +# stage defaults to using the new code generation path. The new +# code generation path is a bit slower, so for development just +# GhcStage2DefaultNewCodegen=YES, but it's also a good idea to try +# building all libraries and the stage2 compiler with the +# new code generator, which involves GhcStage1DefaultNewCodegen=YES. +GhcStage1DefaultNewCodegen=NO +GhcStage2DefaultNewCodegen=NO +GhcStage3DefaultNewCodegen=NO + GhcDebugged=NO GhcDynamic=NO _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc