Skip to content

Pass --debuginfo to wasm-opt when using --no-strip #78

@applejag

Description

@applejag

When firefly-cli calls wasm-opt the debug symbols will always be trimmed.

Right now to get debug symbols I have to run firefly-cli with both --no-opt and --no-strip, but it would be useful to still see the optimized code with debug symbols.

Related code:

firefly-cli/src/wasm.rs

Lines 79 to 99 in 6bfc4b0

let output = Command::new("wasm-opt")
.args([
"-Oz",
"--disable-exception-handling",
"--disable-gc",
"--disable-typed-function-references",
"--enable-bulk-memory",
"--enable-extended-const",
"--enable-memory64",
"--enable-multivalue",
"--enable-mutable-globals",
"--enable-nontrapping-float-to-int",
"--enable-reference-types",
"--enable-relaxed-simd",
"--enable-sign-ext",
"--enable-simd",
"--enable-tail-call",
"-o",
bin_path,
bin_path,
])

When running wasm-opt manually with --debuginfo then the resulting WASM file correctly contains all debug symbols.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions