-
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
Enable wasm source maps. #5335
Enable wasm source maps. #5335
Conversation
/cc @dschuff |
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.
Overall looks nice, just one minor comment above, and also, please update the binaryen tag to 34 so that it uses a version with source maps support (I pushed that tag to binaryen now, so you just need to edit tools/ports/binaryen.py
).
emcc.py
Outdated
@@ -1768,7 +1769,7 @@ def get_eliminate(): | |||
if shared.Settings.CYBERDWARF: | |||
execute([shared.PYTHON, shared.path_from_root('tools', 'emdebug_cd_merger.py'), target + '.cd', target+'.symbols']) | |||
|
|||
if options.debug_level >= 4: | |||
if options.debug_level >= 4 and not shared.Settings.BINARYEN: | |||
emit_source_maps(target, optimizer.js_transform_tempfiles) |
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.
since this method is just for js and not wasm, how about renaming it to emit_js_source_maps
?
Fixed |
Thanks, looks good. Although I notice now that this doesn't have a test. Let's merge this in for now, but can you please add one later? |
@yurydelendik this broke |
Yes, the |
Creates source map file for ".wasm" during compilation with
-g4
. Also adds--source-map-base
option to provide a complete solution -- currently the .wasm file must containsourceMappingURL
section to make it work (per WebAssembly/design#1051).The patch requires binaryen with patch WebAssembly/binaryen#1017
The example output can be found at https://github.com/yurydelendik/wasm-source-map-emscripten/