summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@well-typed.com>2022-06-23 12:12:52 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-06-28 03:24:24 -0400
commitdf762ae9e2d5263fb71f6df38323ac3ca400cc47 (patch)
tree417edc0c63a185422b7b8f49ddfce655abebac79
parent57a5f88cf70ec6dd65ff4a2df0c11805ec1db018 (diff)
downloadhaskell-df762ae9e2d5263fb71f6df38323ac3ca400cc47.tar.gz
-ddump-llvm shouldn't imply -fllvm
Previously -ddump-llvm would change the backend used, which contrasts with all other dump flags. This is quite surprising and cost me quite a bit of time. Dump flags should not change compiler behavior. Fixes #21776.
-rw-r--r--compiler/GHC/Driver/Session.hs2
-rw-r--r--testsuite/tests/codeGen/should_compile/all.T3
2 files changed, 3 insertions, 2 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 99a2c10bf6..67c6ff6938 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -2469,7 +2469,7 @@ dynamic_flags_deps = [
, make_ord_flag defGhcFlag "ddump-asm-stats"
(setDumpFlag Opt_D_dump_asm_stats)
, make_ord_flag defGhcFlag "ddump-llvm"
- (NoArg $ setObjBackend llvmBackend >> setDumpFlag' Opt_D_dump_llvm)
+ (NoArg $ setDumpFlag' Opt_D_dump_llvm)
, make_ord_flag defGhcFlag "ddump-c-backend"
(NoArg $ setDumpFlag' Opt_D_dump_c_backend)
, make_ord_flag defGhcFlag "ddump-deriv"
diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T
index a18451b98e..78d96f83ff 100644
--- a/testsuite/tests/codeGen/should_compile/all.T
+++ b/testsuite/tests/codeGen/should_compile/all.T
@@ -55,7 +55,8 @@ test('T15155',
[ unless(have_ncg(), skip)
], makefile_test, [])
-test('T15155l', [ when(unregisterised(), skip), unless(have_llvm(), skip)],
+test('T15155l',
+ [when(unregisterised(), skip), unless(have_llvm(), skip), only_ways(llvm_ways)],
makefile_test, [])
test('T16449_1', normal, compile, [''])