[Git][ghc/ghc][master] 2 commits: hadrian: add hi_core flavour transformer
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Mon Jan 23 09:49:08 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
1fe806d3 by Cheng Shao at 2023-01-23T04:48:47-05:00
hadrian: add hi_core flavour transformer
The hi_core flavour transformer enables -fwrite-if-simplified-core for
stage1 libraries, which emit core into interface files to make it
possible to restart code generation. Building boot libs with it makes
it easier to use GHC API to prototype experimental backends that needs
core/stg at link time.
- - - - -
317cad26 by Cheng Shao at 2023-01-23T04:48:47-05:00
hadrian: add missing docs for recently added flavour transformers
- - - - -
2 changed files:
- hadrian/doc/flavours.md
- hadrian/src/Flavour.hs
Changes:
=====================================
hadrian/doc/flavours.md
=====================================
@@ -261,6 +261,10 @@ The supported transformers are listed below:
<td>Just like `no_dynamic_ghc`, this transformer ensures statically-linked libraries
</td>
</tr>
+ <tr>
+ <td><code>native_bignum</code></td>
+ <td>Use the native <code>ghc-bignum</code> backend.</td>
+ </tr>
<tr>
<td><code>no_profiled_libs</code></td>
<td>Disables building of libraries in profiled build ways.</td>
@@ -300,6 +304,18 @@ The supported transformers are listed below:
<td>Enable Core, STG, and C-- linting in all compilation with the stage1
compiler.</td>
</tr>
+ <tr>
+ <td><code>haddock</code></td>
+ <td>Emit haddock documentation into the interface files via <code>-haddock</code>.</td>
+ </tr>
+ <tr>
+ <td><code>hi_core</code></td>
+ <td>Emit whole Core bindings into the interface files via <code>-fwrite-if-simplified-core</code>.</td>
+ </tr>
+ <tr>
+ <td><code>late_ccs</code></td>
+ <td>Enable <code>-fprof-late</code> in profiled libraries.</td>
+ </tr>
</table>
### Static
=====================================
hadrian/src/Flavour.hs
=====================================
@@ -15,6 +15,7 @@ module Flavour
, disableProfiledLibs
, enableLinting
, enableHaddock
+ , enableHiCore
, useNativeBignum
, omitPragmas
@@ -62,6 +63,7 @@ flavourTransformers = M.fromList
, "debug_stage1_ghc" =: debugGhc stage0InTree
, "lint" =: enableLinting
, "haddock" =: enableHaddock
+ , "hi_core" =: enableHiCore
, "late_ccs" =: enableLateCCS
]
where (=:) = (,)
@@ -180,6 +182,13 @@ enableHaddock =
[ arg "-haddock"
]
+-- | Build stage2 dependencies with options to emit Core into
+-- interface files which is sufficient to restart code generation.
+enableHiCore :: Flavour -> Flavour
+enableHiCore = addArgs
+ $ notStage0 ? builder (Ghc CompileHs)
+ ? pure ["-fwrite-if-simplified-core"]
+
-- | Transform the input 'Flavour' so as to build with
-- @-split-sections@ whenever appropriate.
-- Note that this transformer doesn't do anything
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/14b5982a3aea351e4b01c5804ebd4d4629ba6bab...317cad26585f0e91c8e3bd41ddbc3444b642b16b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/14b5982a3aea351e4b01c5804ebd4d4629ba6bab...317cad26585f0e91c8e3bd41ddbc3444b642b16b
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/20230123/56c0bd90/attachment-0001.html>
More information about the ghc-commits
mailing list