diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2019-05-07 19:09:25 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-05-14 16:41:19 -0400 |
commit | f9e4ea401121572d799b9db56f24aa1abdf5edf8 (patch) | |
tree | dda533363069c6ad20fe10321b87320a2d65cb22 | |
parent | 015a21b8990a7fcf0d9d31a951af3ae8b06076c4 (diff) | |
download | haskell-f9e4ea401121572d799b9db56f24aa1abdf5edf8.tar.gz |
Dont refer to `cLeadingUnderscore` in test
Can't use this config entry because it's about to go away
-rw-r--r-- | testsuite/tests/th/T16180.hs | 26 | ||||
-rw-r--r-- | testsuite/tests/th/all.T | 4 |
2 files changed, 18 insertions, 12 deletions
diff --git a/testsuite/tests/th/T16180.hs b/testsuite/tests/th/T16180.hs index 073ad7ac9a..99b1a3bb51 100644 --- a/testsuite/tests/th/T16180.hs +++ b/testsuite/tests/th/T16180.hs @@ -1,21 +1,27 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} module Main where import Language.Haskell.TH.Syntax import Foreign.C.String -import Config -- from "ghc" package $(do - -- some targets (e.g. Darwin) require a "_" symbol prefix... - addForeignSource LangAsm (if cLeadingUnderscore == "YES" - then ".global \"_mydata\"\n\ - \_mydata:\n\ - \.ascii \"Hello world\\0\"\n" - else ".global \"mydata\"\n\ - \mydata:\n\ - \.ascii \"Hello world\\0\"\n" - ) + -- some targets (e.g. Darwin) require a "_" symbol prefix. Ideally we + -- could reuse FP_LEADING_UNDERSCORE from aclocal.m4 for this + -- somehow, but this hopefully is OK for now. + addForeignSource LangAsm $ unlines +#if defined(darwin_HOST_OS) || (defined(mingw32_HOST_OS) && WORD_SIZE_IN_BITS == 32) + [ ".global \"_mydata\"" + , "_mydata:" + , ".ascii \"Hello world\\0\"" + ] +#else + [ ".global \"mydata\"" + , "mydata:" + , ".ascii \"Hello world\\0\"" + ] +#endif return []) foreign import ccall "&mydata" mystring :: CString diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index c9f2065c7a..f9738615c7 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -13,7 +13,7 @@ if config.have_ext_interp : setTestOpts(extra_ways(['ext-interp'])) setTestOpts(only_ways(['normal','ghci','ext-interp'])) -broken_tests = ["ClosedFam1TH","T10620","T10828","T11721_TH","T11797","T12045TH2","T12478_1","T12646","T13642","T14060","T15502","T15738","T15792","T15845","T16180","T1835","T3920","T4135","T4188","T5037","T5362","T7477","T7910","T8761","T8884","T8953","T9262","T9692","T9738","TH_Lift","TH_RichKinds","TH_RichKinds2","TH_Roles3","TH_TyInstWhere2","TH_implicitParams","TH_recursiveDo","TH_reifyDecl1","TH_reifyExplicitForAllFams","TH_reifyInstances","TH_reifyMkName","TH_repE2","TH_repGuard","TH_repPrim","TH_repPrim2","TH_repUnboxedTuples","TH_spliceE6","T16326_TH"] +broken_tests = ["ClosedFam1TH","T10620","T10828","T11721_TH","T11797","T12045TH2","T12478_1","T12646","T13642","T14060","T15502","T15738","T15792","T15845","T1835","T3920","T4135","T4188","T5037","T5362","T7477","T7910","T8761","T8884","T8953","T9262","T9692","T9738","TH_Lift","TH_RichKinds","TH_RichKinds2","TH_Roles3","TH_TyInstWhere2","TH_implicitParams","TH_recursiveDo","TH_reifyDecl1","TH_reifyExplicitForAllFams","TH_reifyInstances","TH_reifyMkName","TH_repE2","TH_repGuard","TH_repPrim","TH_repPrim2","TH_repUnboxedTuples","TH_spliceE6","T16326_TH"] # ext-interp, integer-gmp and llvm is broken see #16087 def broken_ext_interp(name, opts): if name in broken_tests and config.ghc_built_by_llvm: @@ -467,7 +467,7 @@ test('T15437', expect_broken(15437), multimod_compile, test('T15985', normal, compile, ['']) test('T16133', normal, compile_fail, ['']) test('T15471', normal, multimod_compile, ['T15471.hs', '-v0']) -test('T16180', normal, compile_and_run, ['-package ghc']) +test('T16180', normal, compile_and_run, ['']) test('T16183', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques']) test('T16195', normal, multimod_compile, ['T16195.hs', '-v0']) test('T16293b', normal, compile, ['']) |