Stream: git-wasmtime

Topic: wasmtime / PR #11075 Avoid running wasm-opt when compilin...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2025 at 12:25):

philipc opened PR #11075 from philipc:wasm-opt to bytecodealliance:main:

wasm-opt will strip DWARF debug info, which causes a test failure for debug::lldb::dwarf_codegen_optimized_wasm_optimized.

clang automatically runs wasm-opt if it is found in PATH and if optimization is enabled. clang-20 has a --no-wasm-opt option, but that doesn't work for wasi-sdk-25.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2025 at 12:25):

philipc requested pchickey for a review on PR #11075.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2025 at 12:25):

philipc requested wasmtime-core-reviewers for a review on PR #11075.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2025 at 20:05):

alexcrichton commented on PR #11075:

Is there a compiler flag to tell wasm-opt to preserve debuginfo we could pass? I'm a bit wary to null out PATH as I think that may cause issues on Windows and otherwise thwart detection of various tools clang might otherwise do?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2025 at 23:31):

philipc commented on PR #11075:

wasm-opt has a -g flag which may or may not be sufficient, but I can't see a way to pass that through clang. But even if that worked, I would still prefer to not run wasm-opt. I don't think tests should be changing behaviour based on whether wasm-opt happens to be in the path.

I could add something to wasmtime to build a binary called wasm-opt which does nothing, and place that first in the path when building the test program.

Or I could change my own system to avoid the problem, but that won't fix it for others.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 20 2025 at 00:12):

philipc commented on PR #11075:

Maybe it's best to wait for wasi-sdk to use a newer clang version so we can use --no-wasm-opt.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 20 2025 at 14:03):

alexcrichton submitted PR review:

Agreed we ideally don't want to run wasm-opt at all here, and agreed tests should pass regardless of whether wasm-opt is on a system or not.

This seems reasonable enough for now and while I have a hunch this may not work on Windows let's let CI tell us that insted of speculating.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 20 2025 at 14:25):

alexcrichton merged PR #11075.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 20 2025 at 15:28):

alexcrichton commented on PR #11075:

Hey if it works it works, we can always clean up later if needed once wasi-sdk is upgraded :+1:


Last updated: Dec 06 2025 at 06:05 UTC