Allow passing "flavor" to 'ghcup compile ghc'

Fixes #183
This commit is contained in:
2021-07-20 13:08:17 +02:00
parent a6108f8319
commit 9e181b8820
2 changed files with 41 additions and 16 deletions

View File

@@ -182,6 +182,7 @@ data GHCCompileOptions = GHCCompileOptions
, addConfArgs :: [Text]
, setCompile :: Bool
, ovewrwiteVer :: Maybe Version
, buildFlavour :: Maybe String
}
data UpgradeOpts = UpgradeInplace
@@ -987,6 +988,13 @@ ghcCompileOpts =
"Allows to overwrite the finally installed VERSION with a different one, e.g. when you build 8.10.4 with your own patches, you might want to set this to '8.10.4-p1'"
)
)
<*> optional
(option
str
(short 'f' <> long "flavour" <> metavar "BUILD_FLAVOUR" <> help
"Set the compile build flavour (this value depends on the build system type: 'make' vs 'hadrian')"
)
)
toolVersionParser :: Parser ToolVersion
@@ -1926,6 +1934,7 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
buildConfig
patchDir
addConfArgs
buildFlavour
GHCupInfo { _ghcupDownloads = dls } <- lift getGHCupInfo
let vi = getVersionInfo (_tvVersion targetVer) GHC dls
when setCompile $ void $ liftE $