Enable wasm source maps.#5335
Conversation
|
/cc @dschuff |
kripken
left a comment
There was a problem hiding this comment.
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
|
|
||
| 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.
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-baseoption to provide a complete solution -- currently the .wasm file must containsourceMappingURLsection 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/