summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-04-06 13:56:53 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-07 12:39:00 -0400
commitd014ab0db0c167ab5a0f9cb15280aee6fd8f3621 (patch)
tree9c60484f66b951774db80f2de2e98e978087467a /testsuite
parent546f8b1478e43f18b25236a20c6c30fa986a046a (diff)
downloadhaskell-d014ab0db0c167ab5a0f9cb15280aee6fd8f3621.tar.gz
Remove dynamic-by-default (#16782)
Dynamic-by-default was a mechanism to automatically select the -dynamic way for some targets. It was implemented in a convoluted way: it was defined as a flavour option, hence it couldn't be passed as a global settings (which are produced by `configure` before considering flavours), so a build system rule was used to pass -DDYNAMIC_BY_DEFAULT to the C compiler so that deriveConstants could infer it. * Make build system has it disabled for 8 years (951e28c0625ece7e0db6ac9d4a1e61e2737b10de) * It has never been implemented in Hadrian * Last time someone tried to enable it 1 year ago it didn't work (!2436) * Having this as a global constant impedes making GHC multi-target (see !5427) This commit fully removes support for dynamic-by-default. If someone wants to reimplement something like this, it would probably need to move the logic in the compiler. (Doing this would probably need some refactoring of the way the compiler handles DynFlags: DynFlags are used to store and to pass enabled ways to many parts of the compiler. It can be set by command-line flags, GHC API, global settings. In multi-target GHC, we will use DynFlags to load the target platform and its constants: but at this point with the current DynFlags implementation we can't easily update the existing DynFlags with target-specific options such as dynamic-by-default without overriding ways previously set by the user.)
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/config/ghc7
-rw-r--r--testsuite/mk/ghc-config.hs1
-rw-r--r--testsuite/mk/test.mk6
-rw-r--r--testsuite/tests/rename/prog006/Makefile6
-rw-r--r--testsuite/tests/safeHaskell/check/pkg01/Makefile4
5 files changed, 3 insertions, 21 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index fa2c9d7c7c..4ecdc5bcb0 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -55,11 +55,8 @@ if ghc_with_threaded_rts:
if ghc_with_dynamic_rts:
config.have_shared_libs = True
-if config.ghc_dynamic_by_default and config.have_vanilla == 1:
- config.run_ways.append('static')
-else:
- if ghc_with_dynamic_rts:
- config.run_ways.append('dyn')
+if ghc_with_dynamic_rts:
+ config.run_ways.append('dyn')
if (config.have_profiling and ghc_with_threaded_rts):
config.run_ways.append('profthreaded')
diff --git a/testsuite/mk/ghc-config.hs b/testsuite/mk/ghc-config.hs
index cfd6147cd0..8870a35f80 100644
--- a/testsuite/mk/ghc-config.hs
+++ b/testsuite/mk/ghc-config.hs
@@ -24,7 +24,6 @@ main = do
getGhcFieldOrFail fields "GhcWithSMP" "Support SMP"
getGhcFieldOrFail fields "GhcRTSWays" "RTS ways"
getGhcFieldOrFail fields "GhcLeadingUnderscore" "Leading underscore"
- getGhcFieldOrDefault fields "GhcDynamicByDefault" "Dynamic by default" "NO"
getGhcFieldOrDefault fields "GhcDynamic" "GHC Dynamic" "NO"
getGhcFieldOrDefault fields "GhcProfiled" "GHC Profiled" "NO"
getGhcFieldProgWithDefault fields "AR" "ar command" "ar"
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index a7276207f5..bf0785116d 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -172,13 +172,7 @@ else
RUNTEST_OPTS += -e config.have_fast_bignum=True
endif
-ifeq "$(GhcDynamicByDefault)" "YES"
-RUNTEST_OPTS += -e config.ghc_dynamic_by_default=True
-CABAL_MINIMAL_BUILD = --enable-shared --disable-library-vanilla
-else
-RUNTEST_OPTS += -e config.ghc_dynamic_by_default=False
CABAL_MINIMAL_BUILD = --enable-library-vanilla --disable-shared
-endif
ifeq "$(GhcDynamic)" "YES"
RUNTEST_OPTS += -e config.ghc_dynamic=True
diff --git a/testsuite/tests/rename/prog006/Makefile b/testsuite/tests/rename/prog006/Makefile
index f7a5f75afe..d2fedd9755 100644
--- a/testsuite/tests/rename/prog006/Makefile
+++ b/testsuite/tests/rename/prog006/Makefile
@@ -18,17 +18,13 @@ include $(TOP)/mk/test.mk
LOCAL_PKGCONF=local.package.conf
LOCAL_GHC_PKG = '$(GHC_PKG)' --no-user-package-db -f $(LOCAL_PKGCONF)
-ifeq "$(GhcDynamicByDefault)" "YES"
-RM_PROG006_EXTRA_FLAGS = -hisuf dyn_hi -osuf dyn_o
-endif
-
rn.prog006:
rm -f A.hi A.o B/C.hi B/C.o Main.hi Main.o
rm -f A.dyn_hi A.dyn_o B/C.dyn_hi B/C.dyn_o Main.dyn_hi Main.dyn_o
rm -f pkg.conf
rm -f pwd pwd.exe pwd.exe.manifest pwd.hi pwd.o
'$(TEST_HC)' $(TEST_HC_OPTS) --make pwd -v0
- '$(TEST_HC)' $(TEST_HC_OPTS) --make -this-unit-id test-1.0-XXX B.C -fforce-recomp -v0 $(RM_PROG006_EXTRA_FLAGS)
+ '$(TEST_HC)' $(TEST_HC_OPTS) --make -this-unit-id test-1.0-XXX B.C -fforce-recomp -v0
rm -f pkg.conf
echo "name: test" >>pkg.conf
echo "version: 1.0" >>pkg.conf
diff --git a/testsuite/tests/safeHaskell/check/pkg01/Makefile b/testsuite/tests/safeHaskell/check/pkg01/Makefile
index ed5185d7e5..283a7df530 100644
--- a/testsuite/tests/safeHaskell/check/pkg01/Makefile
+++ b/testsuite/tests/safeHaskell/check/pkg01/Makefile
@@ -8,11 +8,7 @@ cleanPackageDatabase.%:
HERE := $(abspath .)
$(eval $(call canonicalise,HERE))
-ifeq "$(GhcDynamicByDefault)" "YES"
-HI_SUF = dyn_hi
-else
HI_SUF = hi
-endif
mkPackageDatabase.%:
$(MAKE) -s --no-print-directory cleanPackageDatabase.$*