Disallow loading code on `x86_64-unknown-none` (#11553)
* Disallow loading code on `x86_64-unknown-none`
... And then also add an escape hatch to allow loading code. This commit is the culmination
Disallow loading code on `x86_64-unknown-none` (#11553)
* Disallow loading code on `x86_64-unknown-none`
... And then also add an escape hatch to allow loading code. This commit is the culmination of discussion on #11506 with a proposed resolution for Wasmtime. The resolution being:
* Wasmtime will reject loading code on `x86_64-unknown-none` platforms by default. * A new `Config::x86_float_abi_ok` escape hatch is added to bypass this check. * Documentation/errors are updated around `x86_float_abi_ok` to document the situation. * The `min-platform` example is updated to showcase how this is valid to run in that particular embedding (aka enable more features and sufficiently detect said features).
The basic tl;dr; is that we can't detect in stable Rust what float ABI is being used so therefore we pessimistically assume that `x86_64-unknown-none` is using a soft-float ABI. This is incompatible with libcalls unless they aren't actually called which is only possible when sufficiently many target features are enabled.
The goal of this commit is to be a relatively low-effort way to place a roadblock in the way of "ok ABIs are weird" but at the same time enable getting around the roadblock easily. Additionally the roadblock points to documentation about itself to learn more about what's going on here.
Closes #11506
* Add audit of raw-cpuid
* Add back in check
Turns out it doesn't go through the same path as other bits
* Review comments
* Fix running floats without without custom support
show more ...
|