Commit 5382010a authored by ian@well-typed.com's avatar ian@well-typed.com

Change '{if,unless}_arch' to 'arch'

parent 40f960da
......@@ -322,17 +322,8 @@ def platform( plat ):
def opsys( os ):
return config.os == os
def if_arch( arch, f ):
if config.arch == arch:
return f
else:
return normal
def unless_arch( arch, f ):
if config.arch == arch:
return normal
else:
return f
def arch( arch ):
return config.arch == arch
def wordsize( ws ):
return config.wordsize == str(ws)
......
......@@ -15,8 +15,8 @@ test('T3286', extra_clean(['T3286b.o','T3286b.hi']),
test('T3579', normal, compile, [''])
test('T2578', normal, run_command, ['$MAKE -s --no-print-directory T2578'])
# skip llvm on i386 as we don't support fPIC
test('jmp_tbl', if_arch('i386', omit_ways(['llvm', 'optllvm'])), compile, ['-fPIC -O'])
test('jmp_tbl', when(arch('i386'), omit_ways(['llvm', 'optllvm'])), compile, ['-fPIC -O'])
test('massive_array',
[ if_arch('i386', omit_ways(['llvm', 'optllvm'])) ],
[ when(arch('i386'), omit_ways(['llvm', 'optllvm'])) ],
compile, ['-fPIC'])
test('T7237', normal, compile, [''])
......@@ -87,7 +87,7 @@ test('T5149', omit_ways(['ghci']), multi_compile_and_run,
['T5149', [('T5149_cmm.cmm', '')], ''])
test('T5129', normal, compile_and_run, [''])
test('T5626', exit_code(1), compile_and_run, [''])
test('T5747', if_arch('i386', extra_hc_opts('-msse2')), compile_and_run, ['-O2'])
test('T5747', when(arch('i386'), extra_hc_opts('-msse2')), compile_and_run, ['-O2'])
test('T5785', normal, compile_and_run, [''])
test('setByteArray', normal, compile_and_run, [''])
......
......@@ -32,7 +32,7 @@ test('ffi004', skip, compile_and_run, [''])
# use of 80-bit internal precision when using the native code generator.
#
test('ffi005', [ omit_ways(prof_ways),
if_arch('i386', skip),
when(arch('i386'), skip),
when(platform('i386-apple-darwin'), expect_broken(4105)),
exit_code(3) ],
compile_and_run, [''])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment