-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[embind] Always enable assertions during TypeScript generation. #21695
[embind] Always enable assertions during TypeScript generation. #21695
Conversation
cb06945
to
0483145
Compare
tools/link.py
Outdated
@@ -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) | |||
# Assertions are always used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention why?
Something changed so now when assertions are enabled |
I guess this was #21172. Maybe instead of relying on |
Unless you are in strict mode |
Yeah, the original issue filed above was using |
Or I guess I can do ifdefs like all the other library code. |
@@ -476,10 +476,9 @@ var LibraryEmbind = { | |||
} | |||
argStart = 2; | |||
} | |||
#if ASSERTIONS | |||
if (argsName.length) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add curly braces around the if body ?
Fixes #21641