eduardosm opened PR #6551 from eduardosm:explicit-host-isa
to bytecodealliance:main
:
It is needed because cargo features are additive. Given a situation where you have two dependencies:
- One depends on cranelift aarch64 codegen, so it enables the
aarch64
feature.- The other depends on cranelift native codegen, so it does not enable any arch feature.
Given the additive property of features, cranelift-codegen will be built with the
aarch64
feature for both dependencies (assuming they use the same cranelift version), so the native ISA will not be included (unless it is aarch64).With the
host-arch
feature added here, the native host ISA can now be explicitly requested without risk of another crate of the dependency tree disabling it.The native ISA is still enabled when none is explicitly enabled, although I think that this behaviour should be deprecated.
eduardosm requested elliottt for a review on PR #6551.
eduardosm requested wasmtime-compiler-reviewers for a review on PR #6551.
elliottt submitted PR review:
This makes sense to me, thanks for the great explanation!
eduardosm updated PR #6551.
alexcrichton merged PR #6551.
Last updated: Dec 23 2024 at 12:05 UTC