File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed
compiler/rustc_codegen_ssa/src/back Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -276,27 +276,18 @@ impl<'a> Linker for GccLinker<'a> {
276
276
fn set_output_kind ( & mut self , output_kind : LinkOutputKind , out_filename : & Path ) {
277
277
match output_kind {
278
278
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 {
283
280
self . cmd . arg ( "-no-pie" ) ;
284
281
}
285
282
}
286
283
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" ) ;
292
286
}
293
287
LinkOutputKind :: StaticNoPicExe => {
294
288
// `-static` works for both gcc wrapper and ld.
295
289
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 {
300
291
self . cmd . arg ( "-no-pie" ) ;
301
292
}
302
293
}
You can’t perform that action at this time.
0 commit comments