From dceecb093c3ee1e4dc970bb6669ff855ec37f6ac Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Tue, 11 Feb 2020 09:38:18 +0100 Subject: Update Hadrian * support ghc-bignum backend selection in flavours and command-line * support ghc-bignum "--check" flag (compare results of selected backend against results of the native one) in flavours and command-line (e.g. pass --bignum=check-gmp" to check the "gmp" backend) * remove the hack to workaround #15286 * build GMP only when the gmp backend is used * remove hacks to workaround `text` package flags about integer-*. We fix `text` to use ghc-bignum unconditionally in another patch --- hadrian/doc/make.md | 11 ----------- hadrian/doc/user-settings.md | 14 ++++++++------ 2 files changed, 8 insertions(+), 17 deletions(-) (limited to 'hadrian/doc') diff --git a/hadrian/doc/make.md b/hadrian/doc/make.md index b0e19e4721..318b736fa5 100644 --- a/hadrian/doc/make.md +++ b/hadrian/doc/make.md @@ -94,17 +94,6 @@ time you fire up a build. This is not possible with the Make build system. ``` See [flavours documentation](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/flavours.md) for info on flavours. -- Building with `integer-simple` as the integer library - - ``` sh - # Make - echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk - make - - # Hadrian - build --integer-simple - ``` - - Freezing the stage 1 GHC compiler ``` sh diff --git a/hadrian/doc/user-settings.md b/hadrian/doc/user-settings.md index 9963bac5ed..ada2b98760 100644 --- a/hadrian/doc/user-settings.md +++ b/hadrian/doc/user-settings.md @@ -21,8 +21,10 @@ data Flavour = Flavour { args :: Args, -- | Build these packages. packages :: Stage -> Action [Package], - -- | Either 'integerGmp' or 'integerSimple'. - integerLibrary :: Action Package, + -- | Bignum backend: 'native', 'gmp', 'ffi', etc. + bignumBackend :: String, + -- | Check bignum backend against native + bignumCheck :: Bool, -- | Build libraries these ways. libraryWays :: Ways, -- | Build RTS these ways. @@ -168,12 +170,12 @@ userPackage = library "user-package" You will also need to add `userPackage` to a specific build stage by modifying the `packages` setting of the user flavour as otherwise it will not be built. -You can choose which integer library to use when building GHC using the -`integerLibrary` setting of the build flavour. Possible values are: `integerGmp` -(default) and `integerSimple`. +You can choose which Bignum backend to use when buidling GHC using the +`bignumBackend` setting of the build flavour. Possible values are: `gmp` +(default), `native` or `ffi`. ```haskell userFlavour :: Flavour -userFlavour = defaultFlavour { name = "user", integerLibrary = pure integerSimple } +userFlavour = defaultFlavour { name = "user", bignumBackend = "native" } ``` #### Specifying the final stage to build -- cgit v1.2.1