Open bjorn3 opened 2 years ago
Avoid the object file linking hack. It doesn't work on macOS and Windows but is currently necessary as incr comp expects each codegen unit to provide a single object file instead of allowing an extra object file for the compiled assembly.
I managed to do this on the parallel_comp_refactor branch.
Merged in #1264.
Mostly implemented const and sym operands for both inline and global asm.
As of https://github.com/rust-lang/rustc_codegen_cranelift/pull/1403 inline asm is now supported and stable on all targets supported by cg_clif.
awesome!
did a quick test with building our codebase with this and did fail on wasmtime-runtime
using inline asm:
error: asm! and global_asm! sym operands are not yet supported
--> /home/repi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-runtime-14.0.2/src/libcalls.rs:156:5
|
156 | wasmtime_environ::foreach_builtin_function!(libcall);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `std::arch::global_asm` which comes from the expansion of the macro `wasmtime_environ::foreach_builtin_function` (in Nightly builds, run with -Z macro-backtrace for more info)
related to this note?
For global asm (https://github.com/rust-lang/rustc_codegen_cranelift/pull/1351, but doesn't work when the function is made private to the codegen unit)
or maybe this was not part of the new deployed rustup component?
related to this note?
Correct. So far I had only checked wasmtime with unstable features enabled (as is the default for building it using ./y.sh
in this repo), but not with unstable features disabled (as is the case for the rustc-codegen-cranelift-preview rustup component) With unstable features enabled the entire wasmtime test suite passes with the exception of a couple of tests that need panic=unwind.
ah good to know, and fantastic that the full test suite passes!
const
operands.sym
operands.#[inline]
. (122219237437ee1deee33df9806a4316194a6f76)Tracking issue for stabilizingHas been stabilized.asm!()
: https://github.com/rust-lang/rust/issues/72016