mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
Support compiling for the android NDK (#13245)
This commit is contained in:
parent
3b2f0c3eee
commit
8d4778b4f9
@ -9,6 +9,7 @@ pub const want_aeabi = switch (builtin.abi) {
|
||||
.musleabihf,
|
||||
.gnueabi,
|
||||
.gnueabihf,
|
||||
.android,
|
||||
=> switch (builtin.cpu.arch) {
|
||||
.arm, .armeb, .thumb, .thumbeb => true,
|
||||
else => false,
|
||||
|
||||
@ -18,7 +18,7 @@ const gcc_word = usize;
|
||||
pub const panic = common.panic;
|
||||
|
||||
comptime {
|
||||
if (builtin.link_libc and builtin.os.tag == .openbsd) {
|
||||
if (builtin.link_libc and (builtin.abi == .android or builtin.os.tag == .openbsd)) {
|
||||
@export(__emutls_get_address, .{ .name = "__emutls_get_address", .linkage = common.linkage });
|
||||
}
|
||||
}
|
||||
|
||||
@ -320,6 +320,9 @@ pub const pthread_rwlock_t = switch (native_abi) {
|
||||
size: [56]u8 align(@alignOf(usize)) = [_]u8{0} ** 56,
|
||||
},
|
||||
};
|
||||
pub usingnamespace if (native_abi == .android) struct {
|
||||
pub const pthread_key_t = c_int;
|
||||
} else struct {};
|
||||
pub const sem_t = extern struct {
|
||||
__size: [__SIZEOF_SEM_T]u8 align(@alignOf(usize)),
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user