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