-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Enable reporting of undefined symbols in wasm-ld #10350
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
Conversation
eac7ad2 to
0995dee
Compare
| emscripten_asm_const_double: function() {}, | ||
| emscripten_asm_const_int_sync_on_main_thread: function() {}, | ||
| emscripten_asm_const_double_sync_on_main_thread: function() {}, | ||
| emscripten_asm_const_async_on_main_thread: function() {}, |
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.
why is this needed, and why just these functions?
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.
Without this change the list of functions in forwarded_json['Functions']['libraryFunctions'] won't include these since (I suppose) it sees them as data rather than functions?
We need the list of include these functions otherwise this new flag won't work with any EM_ASM-using code.
The comment above here says misc definitions to avoid unnecessary unresolved symbols from fastcomp. Which I guess means that fastcomp undefined symbol checker also depends on these, but that is does't care if they are functions of non-functions. I will update the command and apply this change to all those other ones too.
0995dee to
8dcb54d
Compare
|
Should be good to go now. |
When enabled, wasm-ld will report more detailed information about the undefined symbols such as which object file/funcion required the symbols. This works by generating the list of all possible JS-defined symbols and passing that list of wasm-ld so it can determine which symbols are permitted to be undefined. The cost of this feature is that we run the js compiler twice, once before wasm-ld and once after the link once wasm-emscripten-finalize has been run. On my machine this takes around 700 so I'm not enabling this by default yet.
236c5a8 to
77acb02
Compare
When enabled, wasm-ld will report more detailed information about the
undefined symbols such as which object file/funcion required the
symbols.
This works by generating the list of all possible JS-defined symbols
and passing that list of wasm-ld so it can determine which symbols
are permitted to be undefined.
The cost of this feature is that we run the js compiler twice, once
before wasm-ld and once after the link once wasm-emscripten-finalize
has been run. On my machine this takes around 700 so I'm not enabling
this by default yet.