| ... | @@ -72,10 +72,8 @@ pub fn requiresPie(target: *const std.Target, link_mode: std.lang.LinkMode) bool | ... | @@ -72,10 +72,8 @@ pub fn requiresPie(target: *const std.Target, link_mode: std.lang.LinkMode) bool |
| 72 | } | 72 | } |
| 73 | | 73 | |
| 74 | /// This function returns whether non-pic code is completely invalid on the given target. | 74 | /// This function returns whether non-pic code is completely invalid on the given target. |
| 75 | pub fn requiresPic(target: *const std.Target, linking_libc: bool) bool { | 75 | pub fn requiresPic(target: *const std.Target) bool { |
| 76 | return ((target.os.tag == .windows or target.os.tag == .uefi) and (target.cpu.arch == .aarch64 or target.cpu.arch == .x86_64)) or | 76 | return (target.os.tag == .windows or target.os.tag == .uefi) and (target.cpu.arch == .aarch64 or target.cpu.arch == .x86_64); |
| 77 | target.requiresLibC() or | | |
| 78 | (linking_libc and target.isGnuLibC()); | | |
| 79 | } | 77 | } |
| 80 | | 78 | |
| 81 | pub fn requiresPicForDynamicLink(target: *const std.Target) bool { | 79 | pub fn requiresPicForDynamicLink(target: *const std.Target) bool { |