diff --git a/lib/compiler_rt/emutls.zig b/lib/compiler_rt/emutls.zig index 111193934acc..a50b783b62bc 100644 --- a/lib/compiler_rt/emutls.zig +++ b/lib/compiler_rt/emutls.zig @@ -18,7 +18,7 @@ const gcc_word = usize; pub const panic = common.panic; comptime { - if (builtin.link_libc and (builtin.abi == .android or builtin.os.tag == .openbsd)) { + if (builtin.link_libc and (builtin.abi == .android or builtin.os.tag == .openbsd or builtin.abi == .ohos) { @export(__emutls_get_address, .{ .name = "__emutls_get_address", .linkage = common.linkage, .visibility = common.visibility }); } } diff --git a/lib/std/c.zig b/lib/std/c.zig index b1da7c0a2d91..bd558cbc471f 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -52,7 +52,7 @@ pub const pthread_mutex_t = switch (native_os) { data: [data_len]u8 align(@alignOf(usize)) = [_]u8{0} ** data_len, const data_len = switch (native_abi) { - .musl, .musleabi, .musleabihf => if (@sizeOf(usize) == 8) 40 else 24, + .musl, .musleabi, .musleabihf, .ohos => if (@sizeOf(usize) == 8) 40 else 24, .gnu, .gnuabin32, .gnuabi64, .gnueabi, .gnueabihf, .gnux32 => switch (native_arch) { .aarch64 => 48, .x86_64 => if (native_abi == .gnux32) 40 else 32, diff --git a/lib/std/zig/target.zig b/lib/std/zig/target.zig index 5b02bd08047d..d49204777966 100644 --- a/lib/std/zig/target.zig +++ b/lib/std/zig/target.zig @@ -14,6 +14,7 @@ pub const available_libcs = [_]ArchOsAbi{ .{ .arch = .aarch64_be, .os = .windows, .abi = .gnu }, .{ .arch = .aarch64, .os = .linux, .abi = .gnu }, .{ .arch = .aarch64, .os = .linux, .abi = .musl }, + .{ .arch = .aarch64, .os = .linux, .abi = .ohos }, .{ .arch = .aarch64, .os = .windows, .abi = .gnu }, .{ .arch = .aarch64, .os = .macos, .abi = .none, .os_ver = .{ .major = 11, .minor = 0, .patch = 0 } }, .{ .arch = .armeb, .os = .linux, .abi = .gnueabi }, @@ -25,6 +26,7 @@ pub const available_libcs = [_]ArchOsAbi{ .{ .arch = .arm, .os = .linux, .abi = .gnueabihf }, .{ .arch = .arm, .os = .linux, .abi = .musleabi }, .{ .arch = .arm, .os = .linux, .abi = .musleabihf }, + .{ .arch = .arm, .os = .linux, .abi = .ohos }, .{ .arch = .thumb, .os = .linux, .abi = .gnueabi }, .{ .arch = .thumb, .os = .linux, .abi = .gnueabihf }, .{ .arch = .thumb, .os = .linux, .abi = .musleabi }, @@ -67,6 +69,7 @@ pub const available_libcs = [_]ArchOsAbi{ .{ .arch = .x86_64, .os = .linux, .abi = .gnu }, .{ .arch = .x86_64, .os = .linux, .abi = .gnux32 }, .{ .arch = .x86_64, .os = .linux, .abi = .musl }, + .{ .arch = .x86_64, .os = .linux, .abi = .ohos }, .{ .arch = .x86_64, .os = .windows, .abi = .gnu }, .{ .arch = .x86_64, .os = .macos, .abi = .none, .os_ver = .{ .major = 10, .minor = 7, .patch = 0 } }, };