Skip to content

Commit e0d5872

Browse files
committed
Undo unnecessary changes.
1 parent a862b1f commit e0d5872

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

compiler/rustc_codegen_ssa/src/back/linker.rs

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -276,27 +276,18 @@ impl<'a> Linker for GccLinker<'a> {
276276
fn set_output_kind(&mut self, output_kind: LinkOutputKind, out_filename: &Path) {
277277
match output_kind {
278278
LinkOutputKind::DynamicNoPicExe => {
279-
if !self.is_ld
280-
&& self.sess.target.linker_is_gnu
281-
&& !self.sess.target.is_like_windows
282-
{
279+
if !self.is_ld && self.sess.target.linker_is_gnu {
283280
self.cmd.arg("-no-pie");
284281
}
285282
}
286283
LinkOutputKind::DynamicPicExe => {
287-
// noop on windows w/ gcc & ld, error w/ lld
288-
if !self.sess.target.is_like_windows {
289-
// `-pie` works for both gcc wrapper and ld
290-
self.cmd.arg("-pie");
291-
}
284+
// `-pie` works for both gcc wrapper and ld.
285+
self.cmd.arg("-pie");
292286
}
293287
LinkOutputKind::StaticNoPicExe => {
294288
// `-static` works for both gcc wrapper and ld.
295289
self.cmd.arg("-static");
296-
if !self.is_ld
297-
&& self.sess.target.linker_is_gnu
298-
&& !self.sess.target.is_like_windows
299-
{
290+
if !self.is_ld && self.sess.target.linker_is_gnu {
300291
self.cmd.arg("-no-pie");
301292
}
302293
}

0 commit comments

Comments
 (0)