diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-12-09 15:32:58 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-12-17 07:24:40 -0500 |
commit | 6ea4eb4babf090e447277a3e4b0dea31d79e9acf (patch) | |
tree | 06d4a2e8e137ae55bca7f86c8c01ca22eb628f36 /testsuite/config/ghc | |
parent | 7cef0b7d707c0b242ee788919f76a73d1a3d2c96 (diff) | |
download | haskell-6ea4eb4babf090e447277a3e4b0dea31d79e9acf.tar.gz |
testsuite: Make ghc_built_by_llvm check more precise
Previously it would hackily look at the flavour name to determine
whether LLVM was used to build stage2 ghc. However, this didn't work at
all with Hadrian and would miss cases like ARM where we use the LLVM
backend by default.
See #16087 for the motivation for why ghc_built_by_llvm is needed at
all. This should catch one of the ARMv7 failures described in #17555.
Diffstat (limited to 'testsuite/config/ghc')
-rw-r--r-- | testsuite/config/ghc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc index 5e644d5477..884cb1e953 100644 --- a/testsuite/config/ghc +++ b/testsuite/config/ghc @@ -179,6 +179,15 @@ def get_compiler_info(): config.have_ncg = compilerInfoDict.get("Have native code generator", "NO") == "YES" + # Whether GHC itself was built using the LLVM backend. We need to know this + # since some tests in ext-interp fail when stage2 ghc is built using + # LLVM. See #16087. + # + # The condition here is a bit approximate: we assume that if stage2 doesn't + # have the NCG and isn't unregisterised then it must be using the LLVM + # backend by default. + config.ghc_built_by_llvm = not config.have_ncg and not config.unregisterised + config.have_RTS_linker = compilerInfoDict.get("target has RTS linker", "NO") == "YES" # external interpreter needs RTS linker support # If the field is not present (GHC 8.0 and earlier), assume we don't @@ -220,6 +229,7 @@ def get_compiler_info(): config.ghc_plugin_way = "normal" # Note [Replacing backward slashes in config.libdir] +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # We *do* need to replace backslashes in config.libdir, for the following # reason: |