diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-10-04 18:46:12 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-10-04 23:30:47 +0200 |
commit | c0bdfee72de789d0cfbd8d93a2111f348660cfbc (patch) | |
tree | 420e78a63347ab2e8de48f9836ef5760cdb5c9c9 /testsuite | |
parent | aecf4a5f96d0d3ffcf4cb2c67a20a610d7c64486 (diff) | |
download | haskell-c0bdfee72de789d0cfbd8d93a2111f348660cfbc.tar.gz |
Testsuite: only add -fno-warn-missed-specialisations for ghc>=7.11
It should be possible to run the testsuite with older versions of GHC.
Reviewed by: austin
Differential Revision: https://phabricator.haskell.org/D1308
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/mk/ghc-config.hs | 6 | ||||
-rw-r--r-- | testsuite/mk/test.mk | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/mk/ghc-config.hs b/testsuite/mk/ghc-config.hs index 9a6a5e74df..c5ad5ff3b7 100644 --- a/testsuite/mk/ghc-config.hs +++ b/testsuite/mk/ghc-config.hs @@ -34,6 +34,12 @@ main = do _ -> "package-conf" putStrLn $ "GhcPackageDbFlag" ++ '=':pkgdb_flag + let minGhcVersion711 = case lookup "Project version" fields of + Just v + | parseVersion v >= [7,11] -> "YES" + _ -> "NO" + putStrLn $ "MinGhcVersion711" ++ '=':minGhcVersion711 + getGhcFieldOrFail :: [(String,String)] -> String -> String -> IO () getGhcFieldOrFail fields mkvar key diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk index 27d7f733af..e20a522219 100644 --- a/testsuite/mk/test.mk +++ b/testsuite/mk/test.mk @@ -44,9 +44,11 @@ TEST_HC_OPTS = -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user- # TEST_HC_OPTS += -fno-warn-tabs +ifeq "$(MinGhcVersion711)" "YES" # Don't warn about missing specialisations. They can only occur with `-O`, but # we want tests to produce the same output for all test ways. TEST_HC_OPTS += -fno-warn-missed-specialisations +endif RUNTEST_OPTS = |