diff options
author | Alp Mestanogullari <alpmestan@gmail.com> | 2020-04-08 09:24:55 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-05-13 20:03:30 -0400 |
commit | d7e0b57fda289e2715e7be86d4871503e3c09ee8 (patch) | |
tree | 455eec9a46863ab42a78775c9a6d3843e8115378 /hadrian/src/CommandLine.hs | |
parent | 55e35c0b7e0f4b907dc21d42827b1cea4317226e (diff) | |
download | haskell-d7e0b57fda289e2715e7be86d4871503e3c09ee8.tar.gz |
hadrian: add a --freeze2 option to freeze stage 1 and 2
Diffstat (limited to 'hadrian/src/CommandLine.hs')
-rw-r--r-- | hadrian/src/CommandLine.hs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/hadrian/src/CommandLine.hs b/hadrian/src/CommandLine.hs index 1b111d0b2f..82f25efb6a 100644 --- a/hadrian/src/CommandLine.hs +++ b/hadrian/src/CommandLine.hs @@ -1,6 +1,6 @@ module CommandLine ( - optDescrs, cmdLineArgsMap, cmdFlavour, lookupFreeze1, cmdIntegerSimple, - cmdProgressInfo, cmdConfigure, cmdCompleteSetting, + optDescrs, cmdLineArgsMap, cmdFlavour, lookupFreeze1, lookupFreeze2, + cmdIntegerSimple, cmdProgressInfo, cmdConfigure, cmdCompleteSetting, cmdDocsArgs, lookupBuildRoot, TestArgs(..), TestSpeed(..), defaultTestArgs ) where @@ -24,6 +24,7 @@ data CommandLineArgs = CommandLineArgs { configure :: Bool , flavour :: Maybe String , freeze1 :: Bool + , freeze2 :: Bool , integerSimple :: Bool , progressInfo :: ProgressInfo , buildRoot :: BuildRoot @@ -38,6 +39,7 @@ defaultCommandLineArgs = CommandLineArgs { configure = False , flavour = Nothing , freeze1 = False + , freeze2 = False , integerSimple = False , progressInfo = Brief , buildRoot = BuildRoot "_build" @@ -100,8 +102,9 @@ readBuildRoot ms = set :: BuildRoot -> CommandLineArgs -> CommandLineArgs set flag flags = flags { buildRoot = flag } -readFreeze1 :: Either String (CommandLineArgs -> CommandLineArgs) +readFreeze1, readFreeze2 :: Either String (CommandLineArgs -> CommandLineArgs) readFreeze1 = Right $ \flags -> flags { freeze1 = True } +readFreeze2 = Right $ \flags -> flags { freeze1 = True, freeze2 = True } readIntegerSimple :: Either String (CommandLineArgs -> CommandLineArgs) readIntegerSimple = Right $ \flags -> flags { integerSimple = True } @@ -239,6 +242,8 @@ optDescrs = "Build flavour (Default, Devel1, Devel2, Perf, Prof, Quick or Quickest)." , Option [] ["freeze1"] (NoArg readFreeze1) "Freeze Stage1 GHC." + , Option [] ["freeze2"] (NoArg readFreeze2) + "Freeze Stage2 GHC." , Option [] ["integer-simple"] (NoArg readIntegerSimple) "Build GHC with integer-simple library." , Option [] ["progress-info"] (OptArg readProgressInfo "STYLE") @@ -336,6 +341,9 @@ lookupBuildRoot = buildRoot . lookupExtra defaultCommandLineArgs lookupFreeze1 :: Map.HashMap TypeRep Dynamic -> Bool lookupFreeze1 = freeze1 . lookupExtra defaultCommandLineArgs +lookupFreeze2 :: Map.HashMap TypeRep Dynamic -> Bool +lookupFreeze2 = freeze2 . lookupExtra defaultCommandLineArgs + cmdIntegerSimple :: Action Bool cmdIntegerSimple = integerSimple <$> cmdLineArgs |