1 use super::wasm32_base;
2 use super::{LinkArgs, LinkerFlavor, PanicStrategy, Target, TargetOptions};
4 pub fn target() -> Target {
5 let mut post_link_args = LinkArgs::new();
10 "ERROR_ON_UNDEFINED_SYMBOLS=1".to_string(),
12 "ASSERTIONS=1".to_string(),
14 "ABORTING_MALLOC=0".to_string(),
15 "-Wl,--fatal-warnings".to_string(),
19 let opts = TargetOptions {
20 os: "emscripten".to_string(),
21 linker_flavor: LinkerFlavor::Em,
22 // emcc emits two files - a .js file to instantiate the wasm and supply platform
23 // functionality, and a .wasm file.
24 exe_suffix: ".js".to_string(),
27 is_like_emscripten: true,
28 panic_strategy: PanicStrategy::Unwind,
30 os_family: Some("unix".to_string()),
31 ..wasm32_base::options()
34 llvm_target: "wasm32-unknown-emscripten".to_string(),
36 data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(),
37 arch: "wasm32".to_string(),