From accdb24a086b80fe74776246aa33bce5a920e3c8 Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Tue, 1 Sep 2020 18:18:15 +0200 Subject: Expose RTS-only ways (#18651) Some RTS ways are exposed via settings (ghcThreaded, ghcDebugged) but not all. It's simpler if the RTS exposes them all itself. --- ghc/Main.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ghc/Main.hs') diff --git a/ghc/Main.hs b/ghc/Main.hs index 06a26c45ae..122e4dce0c 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -348,12 +348,12 @@ checkOptions mode dflags srcs objs = do let unknown_opts = [ f | (f@('-':_), _) <- srcs ] when (notNull unknown_opts) (unknownFlagsErr unknown_opts) - when (not (Set.null (Set.filter wayRTSOnly (ways dflags))) + when (not (Set.null (rtsWays (ways dflags))) && isInterpretiveMode mode) $ hPutStrLn stderr ("Warning: -debug, -threaded and -ticky are ignored by GHCi") -- -prof and --interactive are not a good combination - when ((Set.filter (not . wayRTSOnly) (ways dflags) /= hostFullWays) + when ((fullWays (ways dflags) /= hostFullWays) && isInterpretiveMode mode && not (gopt Opt_ExternalInterpreter dflags)) $ do throwGhcException (UsageError -- cgit v1.2.1