Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

11 changed files:

Changes:

  • hadrian/README.md
    ... ... @@ -55,10 +55,9 @@ changes. Build results are placed into `_build` by default.
    55 55
     There are many different ways to build a compiler, each way is called a flavour.
    
    56 56
     
    
    57 57
     * `--flavour=FLAVOUR`: choose a build flavour. The following settings are
    
    58
    -currently supported: `default`, `quick`, `quickest`, `perf`, `prof`, `devel1`
    
    59
    -and `devel2`. As an example, the `quickest` flavour adds `-O0` flag to all GHC
    
    60
    -invocations and builds libraries only in the `vanilla` way, which speeds up
    
    61
    -builds by 3-4x.
    
    58
    +currently supported: `default`, `quick`, `perf`, `prof`, `devel1`
    
    59
    +and `devel2`. As an example, the `quick` flavour builds the GHC binary with `-O0`
    
    60
    +which speeds up builds and rebuilds significantly.
    
    62 61
     
    
    63 62
     In addition to the overall build flavour there are also "flavour transformers"
    
    64 63
     which can slightly modify the build settings for a flavour. Some common flavour
    

  • hadrian/doc/cross-compile.md
    ... ... @@ -16,7 +16,7 @@ After all the dependencies are in place:
    16 16
     - `git submodule update --init`
    
    17 17
     - `./configure --target=arm-linux-gnueabihf`
    
    18 18
     - `cd hadrian`
    
    19
    -- Build the compiler by e.g. `./build.sh --flavour=quickest --integer-simple -V -j`
    
    19
    +- Build the compiler by e.g. `./build.sh --flavour=quick --integer-simple -V -j`
    
    20 20
     
    
    21 21
     After that, you should have built `inplace/bin/ghc-stage1` cross compiler. We will go to the next section to validate this.
    
    22 22
     
    

  • hadrian/doc/flavours.md
    ... ... @@ -82,18 +82,6 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
    82 82
         <td>-O</td>
    
    83 83
         <td>-debug (link)</td>
    
    84 84
       </tr>
    
    85
    -  <tr>
    
    86
    -    <th>quickest</td>
    
    87
    -    <td></td>
    
    88
    -    <td>-O0<br>+RTS<br>-O64M<br>-RTS</td>
    
    89
    -    <td>-O0<br>+RTS<br>-O64M<br>-RTS</td>
    
    90
    -    <td></td>
    
    91
    -    <td></td>
    
    92
    -    <td>-O</td>
    
    93
    -    <td></td>
    
    94
    -    <td>-O</td>
    
    95
    -    <td></td>
    
    96
    -  </tr>
    
    97 85
       <tr>
    
    98 86
         <th>perf</td>
    
    99 87
         <td> Yes (on supported platforms) </td>
    
    ... ... @@ -367,11 +355,4 @@ information. The following table lists ways that are built in different flavours
    367 355
         <td>debug<br>threaded<br>threadedDebug<br>debugDynamic<br>threadedDynamic<br>threadedDebugDynamic</td>
    
    368 356
         <td>debug<br>threaded<br>threadedDebug<br>debugDynamic<br>threadedDynamic<br>threadedDebugDynamic</td>
    
    369 357
     </tr>
    
    370
    -<tr>
    
    371
    -    <th>quickest</th>
    
    372
    -    <td>vanilla</td>
    
    373
    -    <td>vanilla</td>
    
    374
    -    <td>vanilla<br>threaded</td>
    
    375
    -    <td>vanilla<br>threaded</td>
    
    376
    -</tr>
    
    377 358
     </table>

  • hadrian/doc/make.md
    ... ... @@ -80,15 +80,15 @@ time you fire up a build. This is not possible with the Make build system.
    80 80
       build _build/stage1/lib/package.conf.d/text-1.2.3.0.conf # OR actual path
    
    81 81
       ```
    
    82 82
     
    
    83
    -- Building with a particular flavour (e.g `quickest`)
    
    83
    +- Building with a particular flavour (e.g `quick`)
    
    84 84
     
    
    85 85
       ``` sh
    
    86 86
       # Make
    
    87
    -  echo "BuildFlavour=quickest" >> mk/build.mk
    
    87
    +  echo "BuildFlavour=quick" >> mk/build.mk
    
    88 88
       make
    
    89 89
     
    
    90 90
       # Hadrian
    
    91
    -  build --flavour=quickest
    
    91
    +  build --flavour=quick
    
    92 92
       ```
    
    93 93
       See [flavours documentation](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/flavours.md) for info on flavours.
    
    94 94
     
    

  • hadrian/doc/windows.md
    ... ... @@ -20,7 +20,7 @@ stack exec -- pacman -S autoconf automake-wrapper make patch python tar --noconf
    20 20
     stack build
    
    21 21
     
    
    22 22
     # Build GHC
    
    23
    -stack exec hadrian -- --directory ".." -j --flavour=quickest
    
    23
    +stack exec hadrian -- --directory ".." -j --flavour=quick
    
    24 24
     
    
    25 25
     # Test GHC
    
    26 26
     cd ..
    
    ... ... @@ -28,7 +28,7 @@ _build\stage1\bin\ghc -e 1+2
    28 28
     ```
    
    29 29
     
    
    30 30
     The entire process should take about 20 minutes. Note, this will build GHC
    
    31
    -without optimisations. If you need an optimised GHC, drop the `--flavour=quickest`
    
    31
    +without optimisations. If you need an optimised GHC, drop the `--flavour=quick`
    
    32 32
     flag from the build command line (this will slow down the build to about an hour).
    
    33 33
     
    
    34 34
     These are currently not the
    
    ... ... @@ -37,7 +37,7 @@ but are much simpler and may also be more robust.
    37 37
     
    
    38 38
     The `stack build` and `stack exec hadrian` commands can be replaced by an
    
    39 39
     invocation of Hadrian's Stack-based build script:
    
    40
    -`build-stack.bat -j --flavour=quickest`. Use this script if you plan to work on
    
    40
    +`build-stack.bat -j --flavour=quick`. Use this script if you plan to work on
    
    41 41
     Hadrian and/or rebuild GHC often.
    
    42 42
     
    
    43 43
     ## Prerequisites
    

  • hadrian/hadrian.cabal
    ... ... @@ -125,7 +125,6 @@ executable hadrian
    125 125
                            , Settings.Flavours.Performance
    
    126 126
                            , Settings.Flavours.Quick
    
    127 127
                            , Settings.Flavours.QuickCross
    
    128
    -                       , Settings.Flavours.Quickest
    
    129 128
                            , Settings.Flavours.Validate
    
    130 129
                            , Settings.Flavours.Release
    
    131 130
                            , Settings.Packages
    

  • hadrian/src/CommandLine.hs
    ... ... @@ -281,7 +281,7 @@ optDescrs =
    281 281
         , Option ['o'] ["build-root"] (ReqArg readBuildRoot "BUILD_ROOT")
    
    282 282
           "Where to store build artifacts. (Default _build)."
    
    283 283
         , Option [] ["flavour"] (OptArg readFlavour "FLAVOUR")
    
    284
    -      "Build flavour (Default, Devel1, Devel2, Perf, Prof, Quick or Quickest)."
    
    284
    +      "Build flavour (Default, Devel1, Devel2, Perf, Prof or Quick)."
    
    285 285
         , Option [] ["freeze1"] (NoArg readFreeze1)
    
    286 286
           "Freeze Stage1 GHC."
    
    287 287
         , Option [] ["freeze2"] (NoArg readFreeze2)
    

  • hadrian/src/Flavour.hs
    ... ... @@ -531,7 +531,7 @@ It now also offers a more "old-school" interface, in the form of
    531 531
     @foo.bar.baz = v@ or @foo.bar.baz += v@ expressions, that one can
    
    532 532
     pass on the command line that invokes hadrian:
    
    533 533
     
    
    534
    -> $ hadrian/build --flavour=quickest -j "stage1.ghc-bin.ghc.link.opts += -v3"
    
    534
    +> $ hadrian/build --flavour=quick -j "stage1.ghc-bin.ghc.link.opts += -v3"
    
    535 535
     
    
    536 536
     or in a file at <build root>/hadrian.settings, where <build root>
    
    537 537
     is the build root to be used for the build, which is _build by default.
    

  • hadrian/src/Settings.hs
    ... ... @@ -19,7 +19,6 @@ import Settings.Flavours.Development
    19 19
     import Settings.Flavours.GhcInGhci
    
    20 20
     import Settings.Flavours.Performance
    
    21 21
     import Settings.Flavours.Quick
    
    22
    -import Settings.Flavours.Quickest
    
    23 22
     import Settings.Flavours.QuickCross
    
    24 23
     import Settings.Flavours.Validate
    
    25 24
     import Settings.Flavours.Release
    
    ... ... @@ -55,7 +54,6 @@ hadrianFlavours =
    55 54
         , developmentFlavour Stage2, performanceFlavour
    
    56 55
         , releaseFlavour
    
    57 56
         , quickFlavour, quickValidateFlavour, quickDebugFlavour
    
    58
    -    , quickestFlavour
    
    59 57
         , quickCrossFlavour
    
    60 58
         , ghcInGhciFlavour, validateFlavour, slowValidateFlavour
    
    61 59
         ]
    
    ... ... @@ -69,6 +67,10 @@ hadrianFlavours =
    69 67
     flavour :: Action Flavour
    
    70 68
     flavour = do
    
    71 69
         flavourName <- fromMaybe userDefaultFlavour <$> cmdFlavour
    
    70
    +    when ("quickest" `isPrefixOf` flavourName) $
    
    71
    +      fail $ "The `quickest` flavour has been deprecated. Use `quick` instead.\n"
    
    72
    +          ++ "Skip building dynamic libraries with `quick+no_dynamic_libs`\n"
    
    73
    +          ++ "to get closer to the old quickest behaviour."
    
    72 74
         kvs <- userSetting ([] :: [KeyVal])
    
    73 75
         let flavours = hadrianFlavours ++ userFlavours
    
    74 76
             (settingErrs, tweak) = applySettings kvs
    

  • hadrian/src/Settings/Flavours/Quickest.hs deleted
    1
    -module Settings.Flavours.Quickest (quickestFlavour) where
    
    2
    -
    
    3
    -import Expression
    
    4
    -import Flavour
    
    5
    -import {-# SOURCE #-} Settings.Default
    
    6
    -
    
    7
    --- Please update doc/flavours.md when changing this file.
    
    8
    -quickestFlavour :: Flavour
    
    9
    -quickestFlavour = disableDynamicLibs $ disableProfiledLibs $ defaultFlavour
    
    10
    -    { name        = "quickest"
    
    11
    -    , extraArgs        = quickestArgs
    
    12
    -    }
    
    13
    -
    
    14
    -quickestArgs :: Args
    
    15
    -quickestArgs = sourceArgs SourceArgs
    
    16
    -    { hsDefault  = mconcat $
    
    17
    -        [ pure ["-O0", "+RTS", "-O64M", "-RTS"]
    
    18
    -        ]
    
    19
    -    , hsLibrary  = mempty
    
    20
    -    , hsCompiler = stage0 ? arg "-O"
    
    21
    -    , hsGhc      = stage0 ? arg "-O" }

  • utils/ghc-toolchain/src/GHC/Toolchain/Target.hs
    ... ... @@ -199,7 +199,7 @@ tgtSupportsSMP Target{..} = do
    199 199
     -- 5. The testsuite driver will use dyn way for TH/ghci tests even
    
    200 200
     --    when host GHC is static.
    
    201 201
     -- 6. TH/ghci doesn't work if stage1 is built without shared libraries
    
    202
    ---    (e.g. quickest/fully_static).
    
    202
    +--    (e.g. no_dynamic_libs/fully_static).
    
    203 203
     tgtRTSLinkerOnlySupportsSharedLibs :: Target -> Bool
    
    204 204
     tgtRTSLinkerOnlySupportsSharedLibs Target{tgtArchOs} =
    
    205 205
       archOS_arch tgtArchOs `elem`