new target
This commit is contained in:
parent
94bf59ea34
commit
8f64cec022
4 changed files with 12 additions and 6 deletions
|
@ -605,12 +605,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
|
|||
"nvptx64" => nvptx64::compute_abi_info(self),
|
||||
"hexagon" => hexagon::compute_abi_info(self),
|
||||
"riscv32" | "riscv64" => riscv::compute_abi_info(cx, self),
|
||||
"wasm32"
|
||||
if cx.target_spec().os != "emscripten"
|
||||
&& std::env::var("RUSTC_USE_WASM32_BINDGEN_COMPAT_ABI")
|
||||
.map(|x| &x != "0")
|
||||
.unwrap_or(false) =>
|
||||
{
|
||||
"wasm32" if cx.target_spec().os == "bindgen" => {
|
||||
wasm32_bindgen_compat::compute_abi_info(self)
|
||||
}
|
||||
"wasm32" | "asmjs" => wasm32::compute_abi_info(cx, self),
|
||||
|
|
|
@ -613,6 +613,7 @@ supported_targets! {
|
|||
("thumbv7a-uwp-windows-msvc", thumbv7a_uwp_windows_msvc),
|
||||
|
||||
("asmjs-unknown-emscripten", asmjs_unknown_emscripten),
|
||||
("wasm32-unknown-bindgen", wasm32_unknown_bindgen),
|
||||
("wasm32-unknown-emscripten", wasm32_unknown_emscripten),
|
||||
("wasm32-unknown-unknown", wasm32_unknown_unknown),
|
||||
("wasm32-wasi", wasm32_wasi),
|
||||
|
|
9
compiler/rustc_target/src/spec/wasm32_unknown_bindgen.rs
Normal file
9
compiler/rustc_target/src/spec/wasm32_unknown_bindgen.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
//! This target is a variant of `wasm32-unknown-unknown` which uses the bindgen
|
||||
//! ABI instead of the normal ABI.
|
||||
use super::{wasm32_unknown_unknown, Target};
|
||||
|
||||
pub fn target() -> Target {
|
||||
let mut target = wasm32_unknown_unknown::target();
|
||||
target.options.os = "bindgen".to_string();
|
||||
target
|
||||
}
|
|
@ -126,6 +126,7 @@ target | std | host | notes
|
|||
`thumbv8m.base-none-eabi` | * | | ARMv8-M Baseline
|
||||
`thumbv8m.main-none-eabi` | * | | ARMv8-M Mainline
|
||||
`thumbv8m.main-none-eabihf` | * | | ARMv8-M Mainline, hardfloat
|
||||
`wasm32-unknown-bindgen` | ✓ | | WebAssembly via wasm-bindgen
|
||||
`wasm32-unknown-emscripten` | ✓ | | WebAssembly via Emscripten
|
||||
`wasm32-unknown-unknown` | ✓ | | WebAssembly
|
||||
`wasm32-wasi` | ✓ | | WebAssembly with WASI
|
||||
|
|
Loading…
Add table
Reference in a new issue