Skip to content

Commit

Permalink
Rollup merge of rust-lang#98355 - hoodmane:emscripten-no-default, r=p…
Browse files Browse the repository at this point in the history
…etrochenkov

Update no_default_libraries handling for emscripten target

``@sbc100`` says:

> `-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[]` is almost certainly wrong/out-of-date.   This setting defaults to the empty list anyway these days so its redundant.  Also we now support `-nodefaultlibs` so you can use that, as with other toolchains.

rust-lang#98303 (comment)
  • Loading branch information
compiler-errors authored Jun 23, 2022
2 parents bd0a0ec + b96ae9b commit 060aeed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ impl<'a> Linker for EmLinker<'a> {
fn no_crt_objects(&mut self) {}

fn no_default_libraries(&mut self) {
self.cmd.args(&["-s", "DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[]"]);
self.cmd.arg("-nodefaultlibs");
}

fn export_symbols(&mut self, _tmpdir: &Path, _crate_type: CrateType, symbols: &[String]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub fn target() -> Target {
linker: None,
is_like_emscripten: true,
panic_strategy: PanicStrategy::Unwind,
no_default_libraries: false,
post_link_args,
families: cvs!["unix", "wasm"],
..options
Expand Down

0 comments on commit 060aeed

Please sign in to comment.