elliottt edited PR #6307:
Add the
--emit-clif <PATH>
option towasmtime compile
, making it easier to inspect the intermediate clif produced when compiling a wasm module. The path argument is a directory that will be created if its missing, and it will be populated with files namedwasm_func_<idx>.clif
, where<idx>
is the function index in the wasm module.Currently this option is only supported when using cranelift to compile a wasm module, and an error will be raised if winch is used instead.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
itsrainy submitted PR review:
This looks good to me! Just a couple small comments.
itsrainy submitted PR review:
This looks good to me! Just a couple small comments.
itsrainy created PR review comment:
If the user passes an existing file instead of a directory to
emit-clif
, this will error withError: File exists (os error 17)
. It might be worth checking for that case and passing a slightly more helpful error message.
itsrainy created PR review comment:
The wording here doesn't quite seem right.
/// Emit one clif file into this directory for each compiled function
or maybe
/// The directory path to write clif files into
elliottt created PR review comment:
That's a great point, I'll add a better message for that case!
elliottt updated PR #6307.
elliottt created PR review comment:
I took your second suggestion, and added
, one clif file per wasm function.
to the end. Thanks!
elliottt updated PR #6307.
elliottt updated PR #6307.
elliottt has enabled auto merge for PR #6307.
elliottt merged PR #6307.
Last updated: Nov 22 2024 at 16:03 UTC