Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -3384,7 +3384,9 @@ def test_embind_tsgen_ignore(self):
extra_args = ['-sMODULARIZE',
'--embed-file', 'fail.js',
'-sMINIMAL_RUNTIME=2',
'-sEXPORT_ES6=1']
'-sEXPORT_ES6=1',
'-sASSERTIONS=0',
'-sSTRICT=1']
self.emcc(test_file('other/embind_tsgen.cpp'), extra_args)
self.assertFileContents(test_file('other/embind_tsgen_ignore_2.d.ts'), read_file('embind_tsgen.d.ts'))
# Also test this separately since it conflicts with other settings.
Expand Down
2 changes: 2 additions & 0 deletions tools/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -1966,6 +1966,8 @@ def run_embind_gen(wasm_target, js_syms, extra_settings, linker_inputs):
settings.SINGLE_FILE = False
# Embind may be included multiple times, de-duplicate the list first.
settings.JS_LIBRARIES = dedup_list(settings.JS_LIBRARIES)
# JS and TS generation expects assert to always be defined.
settings.ASSERTIONS = 1
# Replace embind with the TypeScript generation version.
embind_index = settings.JS_LIBRARIES.index('embind/embind.js')
settings.JS_LIBRARIES[embind_index] = 'embind/embind_gen.js'
Expand Down
Loading