mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
Don't pass -pie to linker on windows targets.
This commit is contained in:
parent
e0d5872503
commit
ac5fd90d82
@ -281,8 +281,11 @@ impl<'a> Linker for GccLinker<'a> {
|
||||
}
|
||||
}
|
||||
LinkOutputKind::DynamicPicExe => {
|
||||
// `-pie` works for both gcc wrapper and ld.
|
||||
self.cmd.arg("-pie");
|
||||
// noop on windows w/ gcc & ld, error w/ lld
|
||||
if !self.sess.target.is_like_windows {
|
||||
// `-pie` works for both gcc wrapper and ld.
|
||||
self.cmd.arg("-pie");
|
||||
}
|
||||
}
|
||||
LinkOutputKind::StaticNoPicExe => {
|
||||
// `-static` works for both gcc wrapper and ld.
|
||||
|
Loading…
Reference in New Issue
Block a user