@@ -3032,9 +3032,11 @@ def test_embind_tsgen(self):
30323032
30333033 def test_embind_tsgen_ignore(self):
30343034 create_file('fail.js', 'assert(false);')
3035+ self.emcc_args += ['-lembind', '--embind-emit-tsd', 'embind_tsgen.d.ts']
30353036 # These extra arguments are not related to TS binding generation but we want to
30363037 # verify that they do not interfere with it.
30373038 extra_args = ['-sALLOW_MEMORY_GROWTH=1',
3039+ '-Wno-pthreads-mem-growth',
30383040 '-sMAXIMUM_MEMORY=4GB',
30393041 '--pre-js', 'fail.js',
30403042 '--post-js', 'fail.js',
@@ -3045,28 +3047,30 @@ def test_embind_tsgen_ignore(self):
30453047 '--preload-file', 'fail.js',
30463048 '-O3',
30473049 '-msimd128',
3048- '-sUSE_PTHREADS ',
3050+ '-pthread ',
30493051 '-sPROXY_TO_PTHREAD',
30503052 '-sPTHREAD_POOL_SIZE=1',
30513053 '-sSINGLE_FILE',
30523054 '-lembind', # Test duplicated link option.
30533055 ]
3054- self.run_process([EMCC, test_file('other/embind_tsgen.cpp'),
3055- '-lembind', '--embind-emit-tsd', 'embind_tsgen.d.ts'] + extra_args)
3056+ self.emcc(test_file('other/embind_tsgen.cpp'), extra_args)
30563057 self.assertFileContents(test_file('other/embind_tsgen.d.ts'), read_file('embind_tsgen.d.ts'))
30573058 # Test these args separately since they conflict with arguments in the first test.
30583059 extra_args = ['-sMODULARIZE',
30593060 '--embed-file', 'fail.js',
30603061 '-sMINIMAL_RUNTIME=2',
30613062 '-sEXPORT_ES6=1']
3062- self.run_process([EMCC, test_file('other/embind_tsgen.cpp'),
3063- '-lembind', '--embind-emit-tsd', 'embind_tsgen.d.ts'] + extra_args)
3063+ self.emcc(test_file('other/embind_tsgen.cpp'), extra_args)
30643064 self.assertFileContents(test_file('other/embind_tsgen.d.ts'), read_file('embind_tsgen.d.ts'))
30653065
30663066 def test_embind_tsgen_test_embind(self):
30673067 self.run_process([EMCC, test_file('embind/embind_test.cpp'),
30683068 '-lembind', '--embind-emit-tsd', 'embind_tsgen_test_embind.d.ts',
3069- '-DSKIP_UNBOUND_TYPES']) # TypeScript generation requires all type to be bound.
3069+ # This test explicitly creates std::string from unsigned char pointers
3070+ # which is deprecated in upstream LLVM.
3071+ '-Wno-deprecated-declarations',
3072+ # TypeScript generation requires all type to be bound.
3073+ '-DSKIP_UNBOUND_TYPES'] + self.get_emcc_args())
30703074 self.assertExists('embind_tsgen_test_embind.d.ts')
30713075
30723076 def test_embind_tsgen_val(self):
@@ -3087,7 +3091,8 @@ def test_embind_tsgen_bigint(self):
30873091 def test_embind_tsgen_memory64(self):
30883092 # Check that when memory64 is enabled longs & unsigned longs are mapped to bigint in the generated TS bindings
30893093 self.run_process([EMCC, test_file('other/embind_tsgen_memory64.cpp'),
3090- '-lembind', '--embind-emit-tsd', 'embind_tsgen_memory64.d.ts', '-sMEMORY64'])
3094+ '-lembind', '--embind-emit-tsd', 'embind_tsgen_memory64.d.ts', '-sMEMORY64', '-Wno-experimental'] +
3095+ self.get_emcc_args())
30913096 self.assertFileContents(test_file('other/embind_tsgen_memory64.d.ts'), read_file('embind_tsgen_memory64.d.ts'))
30923097
30933098 def test_emconfig(self):
0 commit comments