Skip to content

Commit

Permalink
Don't need --bignum option
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Jul 7, 2023
1 parent 422b99a commit 0da5572
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
9 changes: 0 additions & 9 deletions app/ghcup/GHCup/OptParse/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ data GHCCompileOptions = GHCCompileOptions
, ovewrwiteVer :: Maybe Version
, buildFlavour :: Maybe String
, hadrian :: Bool
, bignum :: Maybe String
, isolateDir :: Maybe FilePath
}

Expand Down Expand Up @@ -272,13 +271,6 @@ ghcCompileOpts =
<*> switch
(long "hadrian" <> help "Use the hadrian build system instead of make (only git versions seem to be properly supported atm)"
)
<*> optional
(option
str
(long "bignum" <> metavar "INTEGER_BACKEND" <> help
"Set the integer backend. This value differs between make ('integer-gmp' and 'integer-simple') and hadrian ('gmp' and 'native')"
)
)
<*> optional
(option
(eitherReader isolateParser)
Expand Down Expand Up @@ -585,7 +577,6 @@ compile compileCommand settings Dirs{..} runAppState runLogger = do
patches
addConfArgs
buildFlavour
bignum
hadrian
(maybe GHCupInternal IsolateDir isolateDir)
GHCupInfo { _ghcupDownloads = dls } <- lift getGHCupInfo
Expand Down
10 changes: 2 additions & 8 deletions lib/GHCup/GHC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,6 @@ compileGHC :: ( MonadMask m
-> Maybe (Either FilePath [URI]) -- ^ patches
-> [Text] -- ^ additional args to ./configure
-> Maybe String -- ^ build flavour
-> Maybe String -- ^ bignum
-> Bool
-> InstallDir
-> Excepts
Expand Down Expand Up @@ -794,7 +793,7 @@ compileGHC :: ( MonadMask m
]
m
GHCTargetVersion
compileGHC targetGhc crossTarget ov bstrap jobs mbuildConfig patches aargs buildFlavour bignum hadrian installDir
compileGHC targetGhc crossTarget ov bstrap jobs mbuildConfig patches aargs buildFlavour hadrian installDir
= do
PlatformRequest { .. } <- lift getPlatformReq
GHCupInfo { _ghcupDownloads = dls } <- lift getGHCupInfo
Expand Down Expand Up @@ -1024,7 +1023,6 @@ compileGHC targetGhc crossTarget ov bstrap jobs mbuildConfig patches aargs build
lEM $ execWithGhcEnv hadrian_build
( maybe [] (\j -> ["-j" <> show j] ) jobs
++ maybe [] (\bf -> ["--flavour=" <> bf]) buildFlavour
++ maybe [] (\bn -> ["--bignum=" <> bn]) bignum
++ ["binary-dist"]
)
(Just workdir) "ghc-make"
Expand Down Expand Up @@ -1083,7 +1081,7 @@ compileGHC targetGhc crossTarget ov bstrap jobs mbuildConfig patches aargs build
(FileDoesNotExistError bc)
(liftIO $ copyFile bc (build_mk workdir) False)
Nothing ->
liftIO $ T.writeFile (build_mk workdir) (addBigNumToConf $ addBuildFlavourToConf defaultConf)
liftIO $ T.writeFile (build_mk workdir) (addBuildFlavourToConf defaultConf)

liftE $ checkBuildConfig (build_mk workdir)

Expand Down Expand Up @@ -1181,10 +1179,6 @@ compileGHC targetGhc crossTarget ov bstrap jobs mbuildConfig patches aargs build
Just bf -> "BuildFlavour = " <> T.pack bf <> "\n" <> bc
Nothing -> bc

addBigNumToConf bc = case bignum of
Just bn -> bc <> "\nINTEGER_LIBRARY = " <> T.pack bn
Nothing -> bc

isCross :: GHCTargetVersion -> Bool
isCross = isJust . _tvTarget

Expand Down

0 comments on commit 0da5572

Please sign in to comment.