Skip to content

hadrian: Fix flavour compiler stage options off-by-one error

!9193 (closed) rightly pointed out that ghcDebugAssertions was supposed to be a predicate on the stage of the built compiler, but in practice it was a predicate on the stage of the compiler used to build. Unfortunately, although it fixed that issue for ghcDebugAssertions, it simultaneously documented every other similar option (that is, ghcProfiled, ghcDebugged, and ghcThreaded) as behaving the same way when in fact they all used the old behavior.

The new behavior of ghcDebugAssertions seems more intuitive, so this commit changes the interpretation of every other option to match. It also improves the enableProfiledGhc and debugGhc flavour transformers by making them more selective about which stages in which they build additional library/RTS ways.

Merge request reports