mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-01 05:25:38 +00:00
linker: Avoid library duplication with /WHOLEARCHIVE
This commit is contained in:
parent
d44f647ffc
commit
fb9feb35ed
@ -813,11 +813,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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user