diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-05-07 16:19:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-07 16:19:20 +0200 |
| commit | 6e4c842305fc8370de730bf919a6fd1fc4aca962 (patch) | |
| tree | 576006a607eaff1ba756975bd823208c9c891e40 /compiler/rustc_codegen_ssa/src/back | |
| parent | 8f0b1863d0617be844112778e77544a5bcee79cd (diff) | |
| parent | fb9feb35eda218133e4fb8944e66d41b904fc9f8 (diff) | |
| download | rust-6e4c842305fc8370de730bf919a6fd1fc4aca962.tar.gz rust-6e4c842305fc8370de730bf919a6fd1fc4aca962.zip | |
Rollup merge of #84866 - petrochenkov:wholesome, r=Mark-Simulacrum
linker: Avoid library duplication with `/WHOLEARCHIVE` Looks like in #72785 I misinterpreted how the `link.exe`'s `/WHOLEARCHIVE` flag works. It's not necessary to write `mylib /WHOLEARCHIVE:mylib` to mark `mylib` as whole archive, `/WHOLEARCHIVE:mylib` alone is enough. https://docs.microsoft.com/en-us/cpp/build/reference/wholearchive-include-all-library-object-files?view=msvc-160
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/linker.rs | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index a66de89f681..929bdf22755 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -821,11 +821,9 @@ impl<'a> Linker for MsvcLinker<'a> { } fn link_whole_staticlib(&mut self, lib: Symbol, verbatim: bool, _search_path: &[PathBuf]) { - self.link_staticlib(lib, verbatim); self.cmd.arg(format!("/WHOLEARCHIVE:{}{}", lib, if verbatim { "" } else { ".lib" })); } fn link_whole_rlib(&mut self, path: &Path) { - self.link_rlib(path); let mut arg = OsString::from("/WHOLEARCHIVE:"); arg.push(path); self.cmd.arg(arg); |
