summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authoradithyaov <adi.obilisetty@gmail.com>2019-10-07 03:54:09 +0530
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-16 07:05:01 -0400
commitcc2bda505893a65fdc118cb4ccb1c6325dfcc633 (patch)
tree8813a2d0fb98b688ec2c530d686e56d9c813ecb2 /ghc
parent535a88e1f348112c44e27e0083a68f054b055619 (diff)
downloadhaskell-cc2bda505893a65fdc118cb4ccb1c6325dfcc633.tar.gz
Compiling with -S and -fno-code no longer panics (fixes #17143)
Diffstat (limited to 'ghc')
-rw-r--r--ghc/Main.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs
index 4cdf3ecb94..b66f567d2f 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -385,6 +385,10 @@ checkOptions mode dflags srcs objs = do
StopBefore HCc | hscTarget dflags /= HscC
-> throwGhcException $ UsageError $
"the option -C is only available with an unregisterised GHC"
+ StopBefore (As False) | ghcLink dflags == NoLink
+ -> throwGhcException $ UsageError $
+ "the options -S and -fno-code are incompatible. Please omit -S"
+
_ -> return ()
-- Verify that output files point somewhere sensible.