From db14d81098a9eb4d46880fa905f71a204b994942 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Thu, 9 Jun 2022 12:52:03 -0700 Subject: [PATCH] Remove -sASSERTIONS=1 from wasm32_unknown_emscripten default link args This is a debug setting. We should only make debug builds if user requests a debug build. Currently this is inserted in release builds. Furthermore, it would be better to insert these settings in --pre-link-args because then it would be possible to override them if appropriate. Because these are inserted at the end, it is necessary to patch emscripten to remove them. --- compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs index b34cac41d78..f02db4b0f35 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs @@ -20,8 +20,6 @@ pub fn target() -> Target { "-s".into(), "ERROR_ON_UNDEFINED_SYMBOLS=1".into(), "-s".into(), - "ASSERTIONS=1".into(), - "-s".into(), "ABORTING_MALLOC=0".into(), "-Wl,--fatal-warnings".into(), ],