@@ -122,9 +122,9 @@ def run(self, args):
122
122
# Benchmarkers
123
123
benchmarkers = [
124
124
#NativeBenchmarker('clang', CLANG_CC, CLANG),
125
- # NativeBenchmarker('clang-3.2', os.path.join(LLVM_3_2, 'clang'), os.path.join(LLVM_3_2, 'clang++')),
126
- # NativeBenchmarker('clang-3.3', os.path.join(LLVM_3_3, 'clang'), os.path.join(LLVM_3_3, 'clang++')),
127
- # NativeBenchmarker('clang-3.4', os.path.join(LLVM_3_4, 'clang'), os.path.join(LLVM_3_4, 'clang++')),
125
+ NativeBenchmarker ('clang-3.2' , os .path .join (LLVM_3_2 , 'clang' ), os .path .join (LLVM_3_2 , 'clang++' )),
126
+ NativeBenchmarker ('clang-3.3' , os .path .join (LLVM_3_3 , 'clang' ), os .path .join (LLVM_3_3 , 'clang++' )),
127
+ NativeBenchmarker ('clang-3.4' , os .path .join (LLVM_3_4 , 'clang' ), os .path .join (LLVM_3_4 , 'clang++' )),
128
128
#NativeBenchmarker('gcc', 'gcc', 'g++'),
129
129
#JSBenchmarker('sm-f32', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2']),
130
130
JSBenchmarker ('sm-f32-3.2' , SPIDERMONKEY_ENGINE , ['-s' , 'PRECISE_F32=2' ], env = { 'LLVM' : LLVM_3_2 }),
@@ -465,17 +465,15 @@ def test_zzz_java_nbody(self): # tests xmlvm compiled java, including bitcasts o
465
465
466
466
def lua (self , benchmark , expected , output_parser = None , args_processor = None ):
467
467
shutil .copyfile (path_from_root ('tests' , 'lua' , benchmark + '.lua' ), benchmark + '.lua' )
468
- #shutil.copyfile(path_from_root('tests', 'lua', 'binarytrees.lua'), 'binarytrees.lua')
469
- #shutil.copyfile(path_from_root('tests', 'lua', 'scimark.lua'), 'scimark.lua')
470
- emcc_args = self .get_library ('lua' , [os .path .join ('src' , 'lua' ), os .path .join ('src' , 'liblua.a' )], make = ['make' , 'generic' ], configure = None ) + \
471
- ['--embed-file' , benchmark + '.lua' ]
472
- #['--embed-file', 'binarytrees.lua', '--embed-file', 'scimark.lua'] + ['--minify', '0']
473
- shutil .copyfile (emcc_args [0 ], emcc_args [0 ] + '.bc' )
474
- emcc_args [0 ] += '.bc'
475
- native_args = self .get_library ('lua_native' , [os .path .join ('src' , 'lua' ), os .path .join ('src' , 'liblua.a' )], make = ['make' , 'generic' ], configure = None , native = True )
476
-
468
+ def lib_builder (name , native , env_init ):
469
+ ret = self .get_library ('lua' , [os .path .join ('src' , 'lua' ), os .path .join ('src' , 'liblua.a' )], make = ['make' , 'generic' ], configure = None , native = native , cache_name_extra = name , env_init = env_init )
470
+ if native : return ret
471
+ shutil .copyfile (ret [0 ], ret [0 ] + '.bc' )
472
+ ret [0 ] += '.bc'
473
+ return ret
477
474
self .do_benchmark ('lua_' + benchmark , '' , expected ,
478
- force_c = True , args = [benchmark + '.lua' , DEFAULT_ARG ], emcc_args = emcc_args , native_args = native_args , native_exec = os .path .join ('building' , 'lua_native' , 'src' , 'lua' ),
475
+ force_c = True , args = [benchmark + '.lua' , DEFAULT_ARG ], emcc_args = ['--embed-file' , benchmark + '.lua' ],
476
+ lib_builder = lib_builder , native_exec = os .path .join ('building' , 'lua_native' , 'src' , 'lua' ),
479
477
output_parser = output_parser , args_processor = args_processor )
480
478
481
479
def test_zzz_lua_scimark (self ):
0 commit comments