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> {
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 }
You can’t perform that action at this time.
0 commit comments