Simon Jakobi pushed to branch wip/sjakobi/T25450-print-cpu at Glasgow Haskell Compiler / GHC
Commits:
60110d3f by Simon Jakobi at 2026-05-29T11:59:06+02:00
changelog.d: Restore code block using indentation syntax
The previous commit dropped the JSON example because a '{' in a
brace-delimited field value (description: { ... }) makes the Cabal
Distribution.Fields parser fail. Indentation-delimited field values
are not affected, so switch to that syntax and restore the example.
Verified against Cabal-3.16's readFields': the brace form rejects any
'{' or '}' anywhere in the content, while the indentation form parses
the same content cleanly.
Co-Authored-By: Claude Opus 4.8
- - - - -
1 changed file:
- changelog.d/print-enabled-cpu-features
Changes:
=====================================
changelog.d/print-enabled-cpu-features
=====================================
@@ -3,12 +3,16 @@ synopsis: Add --print-enabled-cpu-features flag
issues: #25450
mrs: !16117
-description: {
+description:
GHC now supports a new mode flag ``--print-enabled-cpu-features``, which
prints a JSON object describing the CPU features currently enabled for code
generation, together with a minimal set of ``-m...`` flags that would
reproduce the non-default effective feature set for the current target.
- Dynamic options such as ``-mavx2`` and ``-mbmi2`` are respected.
+ Dynamic options such as ``-mavx2`` and ``-mbmi2`` are respected. ::
+
+ $ ghc -mavx2 --print-enabled-cpu-features
+ {"tag":"enabled-cpu-features","version":1,"target":"x86_64-linux-gnu",
+ "features":["SSE2","SSE3","SSSE3","SSE4.1","SSE4.2","AVX","AVX2"],
+ "as_m_flags":["-mavx2"]}
This is a first step toward implementing ``-march=native``.
-}
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/60110d3f185cae5147fabc4c879c761e...
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/60110d3f185cae5147fabc4c879c761e...
You're receiving this email because of your account on gitlab.haskell.org.