1 import Test
.Cabal
.Prelude
3 -- Test that all the respective defines -DNOERROR... specified in various ways
4 -- all end up routed to the C compiler. Otherwise the C file we depend on will
6 main
= setupAndCabalTest
$ do
7 skipUnlessGhcVersion
">= 8.8"
9 ghc94
<- isGhcVersion
">= 9.4.1"
11 let pwd
= testCurrentDir env
12 win_suffix
= if ghc94
then "-clang.bat" else ".bat"
14 pwd
++ "/custom-cc" ++ if isWin
then win_suffix
else ""
17 [ "--ghc-option=-DNOERROR1"
18 , "--ghc-option=-optc=-DNOERROR2"
19 , "--ghc-option=-optP=-DNOERROR3"
20 , "--with-gcc=" ++ customCC