summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-03-13 21:29:27 +0000
committerIan Lynagh <ian@well-typed.com>2013-03-15 00:49:49 +0000
commitb7126674a5f4ead9c73a6a2cbe0fbc85f7d36c12 (patch)
tree767f78388d2e73d317a64d1c106402de6f9014ed /mk
parent5319ea79fa1572b7d411548532031f9d19b928c6 (diff)
downloadhaskell-b7126674a5f4ead9c73a6a2cbe0fbc85f7d36c12.tar.gz
By default, use the dynamic way for programs in the GHC tree
In particular, this means that GHCi will use DLLs, rather than loading object files itself.
Diffstat (limited to 'mk')
-rw-r--r--mk/build.mk.sample2
-rw-r--r--mk/config.mk.in9
-rw-r--r--mk/validate-settings.mk4
3 files changed, 11 insertions, 4 deletions
diff --git a/mk/build.mk.sample b/mk/build.mk.sample
index e055b49301..338eefb573 100644
--- a/mk/build.mk.sample
+++ b/mk/build.mk.sample
@@ -33,7 +33,7 @@
# A development build, working on the stage 2 compiler:
#BuildFlavour = devel2
-GhcLibWays = $(if $(filter $(DYNAMIC_BY_DEFAULT),YES),dyn,v)
+GhcLibWays = $(if $(filter $(DYNAMIC_GHC_PROGRAMS),YES),dyn,v)
# Uncomment this to get prettier build output.
# Please use V = 1 when reporting GHC bugs.
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 7409e40fe8..a69541a6e5 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -124,8 +124,15 @@ endif
# cabal-install's that are in the wild don't handle it properly.
DYNAMIC_BY_DEFAULT = NO
+# If building both v and dyn ways, then use -dynamic-too to build them.
+# This makes the build faster.
DYNAMIC_TOO = YES
+# Use the dynamic way when building programs in the GHC tree. In
+# particular, this means that GHCi will use DLLs rather than loading
+# object files directly.
+DYNAMIC_GHC_PROGRAMS = YES
+
# Build a compiler that will build *unregisterised* libraries and
# binaries by default. Unregisterised code is supposed to compile and
# run without any support for architecture-specific assembly mangling,
@@ -168,7 +175,7 @@ ArchSupportsGHCi=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(Targe
ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES"
GhcWithInterpreter=YES
else
-GhcWithInterpreter=$(if $(findstring YES,$(DYNAMIC_BY_DEFAULT)),YES,NO)
+GhcWithInterpreter=$(if $(findstring YES,$(DYNAMIC_GHC_PROGRAMS)),YES,NO)
endif
# GhcEnableTablesNextToCode tells us whether the target architecture
diff --git a/mk/validate-settings.mk b/mk/validate-settings.mk
index e2f66f2b68..f6370e9e4c 100644
--- a/mk/validate-settings.mk
+++ b/mk/validate-settings.mk
@@ -37,8 +37,8 @@ GhcStage2HcOpts += -O -dcore-lint
GhcLibHcOpts += -O -dcore-lint
# We define DefaultFastGhcLibWays in this style so that the value is
-# correct even if the user alters DYNAMIC_BY_DEFAULT
-DefaultFastGhcLibWays = $(if $(filter $(DYNAMIC_BY_DEFAULT),YES),dyn,v)
+# correct even if the user alters DYNAMIC_GHC_PROGRAMS
+DefaultFastGhcLibWays = $(if $(filter $(DYNAMIC_GHC_PROGRAMS),YES),dyn,v)
DefaultProfGhcLibWays = $(if $(filter $(GhcProfiled),YES),p,)
ifeq "$(ValidateSpeed)" "FAST"