@@ -3032,9 +3032,11 @@ def test_embind_tsgen(self):
3032
3032
3033
3033
def test_embind_tsgen_ignore(self):
3034
3034
create_file('fail.js', 'assert(false);')
3035
+ self.emcc_args += ['-lembind', '--embind-emit-tsd', 'embind_tsgen.d.ts']
3035
3036
# These extra arguments are not related to TS binding generation but we want to
3036
3037
# verify that they do not interfere with it.
3037
3038
extra_args = ['-sALLOW_MEMORY_GROWTH=1',
3039
+ '-Wno-pthreads-mem-growth',
3038
3040
'-sMAXIMUM_MEMORY=4GB',
3039
3041
'--pre-js', 'fail.js',
3040
3042
'--post-js', 'fail.js',
@@ -3045,28 +3047,30 @@ def test_embind_tsgen_ignore(self):
3045
3047
'--preload-file', 'fail.js',
3046
3048
'-O3',
3047
3049
'-msimd128',
3048
- '-sUSE_PTHREADS ',
3050
+ '-pthread ',
3049
3051
'-sPROXY_TO_PTHREAD',
3050
3052
'-sPTHREAD_POOL_SIZE=1',
3051
3053
'-sSINGLE_FILE',
3052
3054
'-lembind', # Test duplicated link option.
3053
3055
]
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)
3056
3057
self.assertFileContents(test_file('other/embind_tsgen.d.ts'), read_file('embind_tsgen.d.ts'))
3057
3058
# Test these args separately since they conflict with arguments in the first test.
3058
3059
extra_args = ['-sMODULARIZE',
3059
3060
'--embed-file', 'fail.js',
3060
3061
'-sMINIMAL_RUNTIME=2',
3061
3062
'-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)
3064
3064
self.assertFileContents(test_file('other/embind_tsgen.d.ts'), read_file('embind_tsgen.d.ts'))
3065
3065
3066
3066
def test_embind_tsgen_test_embind(self):
3067
3067
self.run_process([EMCC, test_file('embind/embind_test.cpp'),
3068
3068
'-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())
3070
3074
self.assertExists('embind_tsgen_test_embind.d.ts')
3071
3075
3072
3076
def test_embind_tsgen_val(self):
@@ -3087,7 +3091,8 @@ def test_embind_tsgen_bigint(self):
3087
3091
def test_embind_tsgen_memory64(self):
3088
3092
# Check that when memory64 is enabled longs & unsigned longs are mapped to bigint in the generated TS bindings
3089
3093
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())
3091
3096
self.assertFileContents(test_file('other/embind_tsgen_memory64.d.ts'), read_file('embind_tsgen_memory64.d.ts'))
3092
3097
3093
3098
def test_emconfig(self):
0 commit comments