Skip to content

Hadrian: fix ghcDebugAssertions off-by-one error

sheaf requested to merge sheaf/ghc:hadrian-devel2-assertions into master

Commit 6b2f7ffe changed the logic that decided whether to enable debug assertions. However, it had an off-by-one error, as the stage parameter to the function inconsistently referred to the stage of the compiler being used to build or the stage of the compiler we are building.

This patch makes it consistent. In particular, this patch re-enables assertions in the stage 2 compiler when building with devel2 flavour, and disables assertions in the stage 2 compiler when building with validate flavour.

Merge request reports