From cc2bda505893a65fdc118cb4ccb1c6325dfcc633 Mon Sep 17 00:00:00 2001 From: adithyaov Date: Mon, 7 Oct 2019 03:54:09 +0530 Subject: Compiling with -S and -fno-code no longer panics (fixes #17143) --- ghc/Main.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ghc') 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. -- cgit v1.2.1