Skip to content

Commit

Permalink
Emit symbol maps from emscripten. (#780)
Browse files Browse the repository at this point in the history
These will be useful for mapping stack traces on release builds of CanvasKit/Skwasm
  • Loading branch information
eyebrowsoffire authored Oct 16, 2023
1 parent 1d2965f commit 60415e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ config("compiler") {
# Reduces global namespace pollution.
"-s",
"MODULARIZE=1",

# Always produce a symbol map so that we can map crash traces
"--emit-symbol-map",
]
}

Expand Down
7 changes: 6 additions & 1 deletion build/toolchain/wasm.gni
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ template("wasm_toolchain") {

is_clang = true

link_outputs = [ "{{root_out_dir}}/{{target_output_name}}.wasm" ]
link_outputs = [
"{{root_out_dir}}/{{target_output_name}}.wasm",

# We always output a symbol map.
"{{root_out_dir}}/{{target_output_name}}.js.symbols",
]

if (wasm_use_pthreads || (defined(extra_toolchain_args.wasm_use_pthreads) &&
extra_toolchain_args.wasm_use_pthreads)) {
Expand Down

0 comments on commit 60415e4

Please sign in to comment.