Skip to content

Commit fb9feb3

Browse files
committed
linker: Avoid library duplication with /WHOLEARCHIVE
1 parent d44f647 commit fb9feb3

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

compiler/rustc_codegen_ssa/src/back/linker.rs

-2
Original file line numberDiff line numberDiff line change
@@ -813,11 +813,9 @@ impl<'a> Linker for MsvcLinker<'a> {
813813
}
814814

815815
fn link_whole_staticlib(&mut self, lib: Symbol, verbatim: bool, _search_path: &[PathBuf]) {
816-
self.link_staticlib(lib, verbatim);
817816
self.cmd.arg(format!("/WHOLEARCHIVE:{}{}", lib, if verbatim { "" } else { ".lib" }));
818817
}
819818
fn link_whole_rlib(&mut self, path: &Path) {
820-
self.link_rlib(path);
821819
let mut arg = OsString::from("/WHOLEARCHIVE:");
822820
arg.push(path);
823821
self.cmd.arg(arg);

0 commit comments

Comments
 (0)