aboutsummaryrefslogtreecommitdiff
path: root/src/target.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2024-05-20 13:43:09 +0300
committerAndrew Kelley <andrew@ziglang.org>2024-05-20 09:25:52 -0400
commit8aae0d87b5808e3674f2d37c8de7b10e305de9da (patch)
treecbfb4662936bcc7cb2ba75bb36813c8658b6fb27 /src/target.zig
parent9691da71cdb90191abcd4b3cd2d586ab227a6da6 (diff)
downloadzig-8aae0d87b5808e3674f2d37c8de7b10e305de9da.tar.gz
zig-8aae0d87b5808e3674f2d37c8de7b10e305de9da.zip
Target: add OpenHarmonyOS ABI
Closes #20009
Diffstat (limited to 'src/target.zig')
-rw-r--r--src/target.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/target.zig b/src/target.zig
index 8f61b2ba03..6af301e001 100644
--- a/src/target.zig
+++ b/src/target.zig
@@ -45,7 +45,8 @@ pub fn requiresPIC(target: std.Target, linking_libc: bool) bool {
return target.isAndroid() or
target.os.tag == .windows or target.os.tag == .uefi or
osRequiresLibC(target) or
- (linking_libc and target.isGnuLibC());
+ (linking_libc and target.isGnuLibC()) or
+ (target.abi == .ohos and target.cpu.arch == .aarch64);
}
/// This is not whether the target supports Position Independent Code, but whether the -fPIC