22
22
import jsrun
23
23
import common
24
24
from tools .shared import CLANG_CC , CLANG_CXX
25
- from common import test_file , read_file , read_binary
25
+ from common import test_file , read_file , read_binary , needs_make
26
26
from tools .shared import run_process , PIPE , EMCC , config
27
27
from tools import building , utils , shared
28
28
@@ -1006,7 +1006,7 @@ def test_zzz_zlib(self):
1006
1006
src = read_file (test_file ('benchmark/test_zlib_benchmark.c' ))
1007
1007
1008
1008
def lib_builder (name , native , env_init ):
1009
- return self .get_library (os .path .join ('third_party' , 'zlib' ), os .path .join ('libz.a' ), make_args = ['libz.a' ], native = native , cache_name_extra = name , env_init = env_init )
1009
+ return self .get_library (os .path .join ('third_party' , 'zlib' ), os .path .join ('libz.a' ), configure = ['cmake' , '-DCMAKE_POLICY_VERSION_MINIMUM=3.5' , '.' ], make = [ 'cmake' , '--build' , '.' , '--' ], make_args = [ ], native = native , cache_name_extra = name , env_init = env_init )
1010
1010
1011
1011
self .do_benchmark ('zlib' , src , 'ok.' ,
1012
1012
force_c = True , shared_args = ['-I' + test_file ('third_party/zlib' )], lib_builder = lib_builder )
@@ -1039,15 +1039,11 @@ def test_zzz_bullet(self):
1039
1039
1040
1040
def lib_builder (name , native , env_init ):
1041
1041
return self .get_library (str (Path ('third_party/bullet' )),
1042
- [Path ('src/.libs/libBulletDynamics.a' ),
1043
- Path ('src/.libs/libBulletCollision.a' ),
1044
- Path ('src/.libs/libLinearMath.a' )],
1045
- # The --host parameter is needed for 2 reasons:
1046
- # 1) bullet in it's configure.ac tries to do platform detection and will fail on unknown platforms
1047
- # 2) configure will try to compile and run a test file to check if the C compiler is sane. As Cheerp
1048
- # will generate a wasm file (which cannot be run), configure will fail. Passing `--host` enables
1049
- # cross compile mode, which lets configure complete happily.
1050
- configure_args = ['--disable-demos' , '--disable-dependency-tracking' , '--host=i686-unknown-linux' ], native = native , cache_name_extra = name , env_init = env_init )
1042
+ ['src/BulletDynamics/libBulletDynamics.a' ,
1043
+ 'src/BulletCollision/libBulletCollision.a' ,
1044
+ 'src/LinearMath/libLinearMath.a' ],
1045
+ configure = ['cmake' , '.' ], configure_args = ['-DCMAKE_POLICY_VERSION_MINIMUM=3.5' ,'-DBUILD_DEMOS=OFF' , '-DBUILD_EXTRAS=OFF' , '-DUSE_GLUT=OFF' , '-DCMAKE_CXX_STANDARD=14' ],
1046
+ make = ['cmake' , '--build' , '.' , '--' ], make_args = [], native = native , cache_name_extra = name , env_init = env_init )
1051
1047
1052
1048
self .do_benchmark ('bullet' , src , '\n ok.\n ' ,
1053
1049
shared_args = ['-I' + test_file ('third_party/bullet/src' ), '-I' + test_file ('third_party/bullet/Demos/Benchmarks' )],
@@ -1070,6 +1066,7 @@ def test_zzz_sqlite(self):
1070
1066
emcc_args = ['-sFILESYSTEM' , '-sMINIMAL_RUNTIME=0' ],
1071
1067
force_c = True )
1072
1068
1069
+ @needs_make ('depends on freetype' )
1073
1070
def test_zzz_poppler (self ):
1074
1071
utils .write_file ('pre.js' , '''
1075
1072
var benchmarkArgument = %s;
0 commit comments