mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
9a55103b98
- Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
11 lines
335 B
Rust
11 lines
335 B
Rust
use super::{LinkerFlavor, Target, wasm32_unknown_emscripten};
|
|
|
|
pub fn target() -> Result<Target, String> {
|
|
let mut target = wasm32_unknown_emscripten::target()?;
|
|
target.options.post_link_args
|
|
.entry(LinkerFlavor::Em)
|
|
.or_default()
|
|
.extend(vec!["-s".to_string(), "WASM=0".to_string()]);
|
|
Ok(target)
|
|
}
|