@@ -4920,9 +4920,11 @@ def test_dylink_spaghetti(self):
49204920 @needs_make ('mingw32-make' )
49214921 @needs_dylink
49224922 def test_dylink_zlib (self ):
4923- self .emcc_args += ['-Wno-shift-negative-value' , '-I' + test_file ('third_party/zlib' )]
49244923 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' ))
49264928 self .dylink_test (main = read_file (test_file ('third_party/zlib/example.c' )),
49274929 side = zlib_archive ,
49284930 expected = read_file (test_file ('core/test_zlib.out' )),
@@ -6579,27 +6581,18 @@ def test_zlib(self, use_cmake):
65796581 self .skipTest ("Windows cannot run configure sh scripts" )
65806582
65816583 self .maybe_closure ()
6582-
6583- self .emcc_args .append ('-Wno-shift-negative-value' )
6584- self .emcc_args .append ('-Wno-pointer-sign' )
6585-
65866584 if '-g' in self .emcc_args :
65876585 self .emcc_args .append ('-gsource-map' ) # more source maps coverage
65886586
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 )
65956588
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' ]
65986591 self .do_run_from_file (
65996592 test_file ('third_party/zlib/example.c' ),
66006593 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' )])
66036596
66046597 @needs_make ('make' )
66056598 @is_slow_test
0 commit comments