authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-03-26 05:42:23+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-03-26 05:50:51+01:00
loge4a977f9e41165168fed7628134c701e9060a741
tree0bac3eeb16c52547adbba4574e495abe3765929b
parent4219037faf573da8094ae8083d5ae01da6bdff6e
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

compiler: do not enforce PIC for Android

This requirement was put here many years ago in stage1 and I have no idea why because Android does not actually require PIC.

1 files changed, 1 insertions(+), 2 deletions(-)

src/target.zig+1-2
......@@ -54,8 +54,7 @@ pub fn libCxxNeedsLibUnwind(target: *const std.Target) bool {
5454
5555/// This function returns whether non-pic code is completely invalid on the given target.
5656pub fn requiresPic(target: *const std.Target, linking_libc: bool) bool {
57 return target.abi.isAndroid() or
58 ((target.os.tag == .windows or target.os.tag == .uefi) and (target.cpu.arch == .aarch64 or target.cpu.arch == .x86_64)) or
57 return ((target.os.tag == .windows or target.os.tag == .uefi) and (target.cpu.arch == .aarch64 or target.cpu.arch == .x86_64)) or
5958 target.requiresLibC() or
6059 (linking_libc and target.isGnuLibC());
6160}