Rollup merge of #97928 - hoodmane:emscripten-no-assertions, r=tlively

Removes debug settings 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.

``@sbc100``
This commit is contained in:
Matthias Krüger 2022-06-10 22:32:30 +02:00 committed by GitHub
commit 35ba4dc031
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 9 deletions

View File

@ -16,15 +16,7 @@ pub fn target() -> Target {
let mut post_link_args = LinkArgs::new();
post_link_args.insert(
LinkerFlavor::Em,
vec![
"-s".into(),
"ERROR_ON_UNDEFINED_SYMBOLS=1".into(),
"-s".into(),
"ASSERTIONS=1".into(),
"-s".into(),
"ABORTING_MALLOC=0".into(),
"-Wl,--fatal-warnings".into(),
],
vec!["-sABORTING_MALLOC=0".into(), "-Wl,--fatal-warnings".into()],
);
let opts = TargetOptions {