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.
This commit is contained in:
Alex Rønne Petersen
2026-03-26 05:42:23 +01:00
parent 4219037faf
commit e4a977f9e4
+1 -2
View File
@@ -54,8 +54,7 @@ pub fn libCxxNeedsLibUnwind(target: *const std.Target) bool {
/// This function returns whether non-pic code is completely invalid on the given target.
pub fn requiresPic(target: *const std.Target, linking_libc: bool) bool {
return target.abi.isAndroid() or
((target.os.tag == .windows or target.os.tag == .uefi) and (target.cpu.arch == .aarch64 or target.cpu.arch == .x86_64)) or
return ((target.os.tag == .windows or target.os.tag == .uefi) and (target.cpu.arch == .aarch64 or target.cpu.arch == .x86_64)) or
target.requiresLibC() or
(linking_libc and target.isGnuLibC());
}