diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-03-28 15:27:21 -0400 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-05-30 18:07:25 +0100 |
commit | be7d367f544e160bcf905cbac259756f3c4145b6 (patch) | |
tree | 2f65908063e16c42967f5c87a35257f3a4137eb4 /ghc | |
parent | d8d1160c2ffee6e7383f6d273d489aaa013d22eb (diff) | |
download | haskell-be7d367f544e160bcf905cbac259756f3c4145b6.tar.gz |
Basic response file support
Here we introduce support into our command-line parsing infrastructure
and driver for handling gnu-style response file arguments,
typically used to work around platform command-line length limitations.
Fixes #16476.
(cherry picked from commit ba3d4e1c43e6772f11f9a7105ef4bf3be8efb2df)
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/Main.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs index 3cb71b77e8..8e30d1a765 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -560,10 +560,9 @@ parseModeFlags :: [Located String] [Located String], [Warn]) parseModeFlags args = do - let ((leftover, errs1, warns), (mModeFlag, units, errs2, flags')) = - runCmdLine (processArgs mode_flags args) - (Nothing, [], [], []) - mode = case mModeFlag of + ((leftover, errs1, warns), (mModeFlag, units, errs2, flags')) <- + processCmdLineP mode_flags (Nothing, [], [], []) args + let mode = case mModeFlag of Nothing -> doMakeMode Just (m, _) -> m |