[Git][ghc/ghc][wip/backports-8.8] hadrian: Add `validate` and `slow validate` flavours
Ben Gamari
gitlab at gitlab.haskell.org
Sat Jul 11 17:57:36 UTC 2020
Ben Gamari pushed to branch wip/backports-8.8 at Glasgow Haskell Compiler / GHC
Commits:
60a06ed6 by Ben Gamari at 2020-07-11T13:57:26-04:00
hadrian: Add `validate` and `slow validate` flavours
(cherry picked from commit 9a2798e139e3d20183b59bb5a66012db495c66c7)
- - - - -
4 changed files:
- hadrian/doc/flavours.md
- hadrian/hadrian.cabal
- hadrian/src/Settings.hs
- + hadrian/src/Settings/Flavours/Validate.hs
Changes:
=====================================
hadrian/doc/flavours.md
=====================================
@@ -110,6 +110,28 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
<td></td>
<td>-O0<br>-DDEBUG</td>
</tr>
+ <tr>
+ <th>validate</td>
+ <td>-O0<br>-H64m</td>
+ <td>-fllvm-fill-undef-with-garbage</td>
+ <td></td>
+ <td>-O<br>-dcore-lint<br>-dno-debug-output</td>
+ <td>-O2<br>-DDEBUG</td>
+ <td>-O<br>-dcore-lint<br>-dno-debug-output</td>
+ <td>-O</td>
+ <td>-O</td>
+ </tr>
+ <tr>
+ <th>validate</td>
+ <td>-O0<br>-H64m</td>
+ <td>-fllvm-fill-undef-with-garbage</td>
+ <td></td>
+ <td>-O<br>-dcore-lint<br>-dno-debug-output</td>
+ <td>-O2<br>-DDEBUG</td>
+ <td>-O<br>-DDEBUG<br>-dcore-lint<br>-dno-debug-output</td>
+ <td>-O</td>
+ <td>-O</td>
+ </tr>
</table>
## Ways
=====================================
hadrian/hadrian.cabal
=====================================
@@ -96,6 +96,7 @@ executable hadrian
, Settings.Flavours.Quick
, Settings.Flavours.QuickCross
, Settings.Flavours.Quickest
+ , Settings.Flavours.Validate
, Settings.Packages
, Settings.Warnings
, Stage
=====================================
hadrian/src/Settings.hs
=====================================
@@ -17,6 +17,7 @@ import Settings.Flavours.Profiled
import Settings.Flavours.Quick
import Settings.Flavours.Quickest
import Settings.Flavours.QuickCross
+import Settings.Flavours.Validate
getArgs :: Args
getArgs = expr flavour >>= args
@@ -36,7 +37,7 @@ hadrianFlavours :: [Flavour]
hadrianFlavours =
[ defaultFlavour, developmentFlavour Stage1, developmentFlavour Stage2
, performanceFlavour, profiledFlavour, quickFlavour, quickestFlavour
- , quickCrossFlavour ]
+ , quickCrossFlavour, validateFlavour, slowValidateFlavour ]
flavour :: Action Flavour
flavour = do
=====================================
hadrian/src/Settings/Flavours/Validate.hs
=====================================
@@ -0,0 +1,46 @@
+module Settings.Flavours.Validate (validateFlavour, slowValidateFlavour) where
+
+import Expression
+import Flavour
+import Oracles.Flag
+import {-# SOURCE #-} Settings.Default
+
+-- Please update doc/flavours.md when changing this file.
+validateFlavour :: Flavour
+validateFlavour = werror $ defaultFlavour
+ { name = "validate"
+ , args = defaultBuilderArgs <> validateArgs <> defaultPackageArgs
+ , libraryWays = mconcat [ pure [vanilla]
+ , notStage0 ? platformSupportsSharedLibs ? pure [dynamic]
+ ]
+ , rtsWays = mconcat [ pure [vanilla, threaded, debug, logging, threadedDebug, threadedLogging]
+ , notStage0 ? platformSupportsSharedLibs ? pure
+ [ dynamic, threadedDynamic, debugDynamic, threadedDebugDynamic
+ , loggingDynamic, threadedLoggingDynamic
+ ]
+ ]
+ }
+
+validateArgs :: Args
+validateArgs = sourceArgs SourceArgs
+ { hsDefault = mconcat [ stage0 ? pure ["-O0", "-H64m"]
+ -- See #11487
+ , notStage0 ? arg "-fllvm-fill-undef-with-garbage"
+ ]
+ , hsLibrary = pure ["-O", "-dcore-lint", "-dno-debug-output"]
+ , hsCompiler = mconcat [ stage0 ? pure ["-O2", "-DDEBUG"]
+ , notStage0 ? pure ["-O", "-dcore-lint", "-dno-debug-output"]
+ ]
+ , hsGhc = pure ["-O"] }
+
+slowValidateFlavour :: Flavour
+slowValidateFlavour = werror $ validateFlavour
+ { name = "slow-validate"
+ , args = defaultBuilderArgs <> slowValidateArgs <> defaultPackageArgs
+ }
+
+slowValidateArgs :: Args
+slowValidateArgs =
+ mconcat [ validateArgs
+ , notStage0 ? arg "-DDEBUG"
+ ]
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/60a06ed669f0982c166bfac75d64277ed075268f
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/60a06ed669f0982c166bfac75d64277ed075268f
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200711/51ebe89d/attachment-0001.html>
More information about the ghc-commits
mailing list