Skip to content
Snippets Groups Projects
Commit 2129678b authored by Matthew Pickering's avatar Matthew Pickering Committed by Marge Bot
Browse files

configure: Add flag which turns ghc-toolchain check into error

We want to catch these errors in CI, but first we need to a flag which
turns this check into an error.
parent 09c6759e
No related branches found
No related tags found
No related merge requests found
......@@ -171,6 +171,14 @@ AC_ARG_ENABLE(ghc-toolchain,
)
AC_SUBST([EnableGhcToolchain])
AC_ARG_ENABLE(strict-ghc-toolchain-check,
[AS_HELP_STRING([--enable-strict-ghc-toolchain-check],
[Whether to raise an error if the output of ghc-toolchain differs from configure])],
[FP_CAPITALIZE_YES_NO(["$enableval"], [EnableStrictGhcToolchainCheck])],
[EnableStrictGhcToolchainCheck=NO]
)
AC_SUBST([EnableStrictGhcToolchainCheck])
dnl CC_STAGE0, LD_STAGE0, AR_STAGE0 are like the "previous" variable
dnl CC, LD, AR (inherited by CC_STAGE[123], etc.)
dnl but instead used by stage0 for bootstrapping stage1
......
......@@ -151,6 +151,11 @@ $diff_output
Don't worry! This won't affect your ghc in any way.
However, in a near future, we will move to configuring toolchains with "ghc-toolchain" by default, so you might have discovered a future bug.
In light of it, if you've spotted this difference, please report a GHC bug at https://www.haskell.org/ghc/reportabug])
case "$EnableStrictGhcToolchainCheck" in
YES)
AC_MSG_ERROR([Failing due to --enable-strict-ghc-toolchain-check])
esac
fi
])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment