Skip to content

Conversation

@Changqing-JING
Copy link
Contributor

for ([f, v] of Object.entries(FEATURES)) leads to ReferenceError: f is not defined in use strict.
Fix it

Copy link
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add -sSTRICT (or just -sSTRICT_JS) to the build flags to wabt.js maybe?

@Changqing-JING
Copy link
Contributor Author

@sbc100
Thank you very much for review. -sSTRICT_JS can't be set, because:
The current CMakeLists has already set -s MODULARIZE=1, which is conflict with -sSTRICT_JS.
If -sSTRICT_JS is set, it will lead to error:
em++: error: STRICT_JS doesn't work with MODULARIZE or EXPORT_ES6

@Changqing-JING
Copy link
Contributor Author

@sbc100 can this PR be merged? The bug is blocking our esbuild pack

@sbc100 sbc100 merged commit d7ee845 into WebAssembly:main Jan 16, 2024
@Changqing-JING Changqing-JING deleted the bugfix/wabt_post_js_strict branch January 17, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants