Only pass -fno-use-linker-plugin on Windows
Only pass -fno-use-linker-plugin on Windows where it avoids pulling in dependencies. Passing it to clang on OS X and Linux would make it fail though.
This commit is contained in:
parent
793a36617b
commit
e9c4efb1bf
1 changed files with 6 additions and 1 deletions
|
|
@ -931,7 +931,12 @@ fn link_args(cmd: &mut Command,
|
|||
}
|
||||
|
||||
// Rust does its' own LTO
|
||||
cmd.arg("-fno-lto").arg("-fno-use-linker-plugin");
|
||||
cmd.arg("-fno-lto");
|
||||
|
||||
// clang fails hard if -fno-use-linker-plugin is passed
|
||||
if sess.targ_cfg.os == abi::OsWindows {
|
||||
cmd.arg("-fno-use-linker-plugin");
|
||||
}
|
||||
|
||||
// If we're building a dylib, we don't use --gc-sections because LLVM has
|
||||
// already done the best it can do, and we also don't want to eliminate the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue