@@ -4920,9 +4920,11 @@ def test_dylink_spaghetti(self):
4920
4920
@needs_make ('mingw32-make' )
4921
4921
@needs_dylink
4922
4922
def test_dylink_zlib (self ):
4923
- self .emcc_args += ['-Wno-shift-negative-value' , '-I' + test_file ('third_party/zlib' )]
4924
4923
self .set_setting ('RELOCATABLE' )
4925
- zlib_archive = self .get_zlib_library ()
4924
+ zlib_archive = self .get_zlib_library (cmake = WINDOWS )
4925
+ # example.c uses K&R style function declarations
4926
+ self .emcc_args .append ('-Wno-deprecated-non-prototype' )
4927
+ self .emcc_args .append ('-I' + test_file ('third_party/zlib' ))
4926
4928
self .dylink_test (main = read_file (test_file ('third_party/zlib/example.c' )),
4927
4929
side = zlib_archive ,
4928
4930
expected = read_file (test_file ('core/test_zlib.out' )),
@@ -6579,27 +6581,18 @@ def test_zlib(self, use_cmake):
6579
6581
self .skipTest ("Windows cannot run configure sh scripts" )
6580
6582
6581
6583
self .maybe_closure ()
6582
-
6583
- self .emcc_args .append ('-Wno-shift-negative-value' )
6584
- self .emcc_args .append ('-Wno-pointer-sign' )
6585
-
6586
6584
if '-g' in self .emcc_args :
6587
6585
self .emcc_args .append ('-gsource-map' ) # more source maps coverage
6588
6586
6589
- if use_cmake :
6590
- make_args = []
6591
- configure = ['cmake' , '.' ]
6592
- else :
6593
- make_args = ['libz.a' ]
6594
- configure = ['sh' , './configure' ]
6587
+ zlib = self .get_zlib_library (use_cmake )
6595
6588
6596
- # TODO: remove Wno-unknown-warning-option when clang rev 11da1b53 rolls into emscripten
6597
- self .emcc_args += ['-Wno-deprecated-non-prototype' , '-Wno-unknown-warning-option' ]
6589
+ # example.c uses K&R style function declarations
6590
+ self .emcc_args += ['-Wno-deprecated-non-prototype' ]
6598
6591
self .do_run_from_file (
6599
6592
test_file ('third_party/zlib/example.c' ),
6600
6593
test_file ('core/test_zlib.out' ),
6601
- libraries = self . get_library ( 'third_party/ zlib' , 'libz.a' , make_args = make_args , configure = configure ) ,
6602
- includes = [test_file ('third_party/zlib' ), 'building' , 'zlib' ])
6594
+ libraries = zlib ,
6595
+ includes = [test_file ('third_party/zlib' )])
6603
6596
6604
6597
@needs_make ('make' )
6605
6598
@is_slow_test
0 commit comments