authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-29 15:32:32+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-29 15:35:35+02:00
log358ee859bae5baa87bcff1fabfde87fe2aa1ab52
tree6b1038f1d0e119004b7275988fa0d0e3e8db0ffd
parent7cae6b8fa78a75b62c5e2a69afda95b3c3824a5b
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

compiler-rt: Fix some exports for *-windows-none.


4 files changed, 8 insertions(+), 3 deletions(-)

lib/compiler_rt.zig+1-1
...@@ -260,7 +260,7 @@ comptime {...@@ -260,7 +260,7 @@ comptime {
260 _ = @import("compiler_rt/ssp.zig");260 _ = @import("compiler_rt/ssp.zig");
261 }261 }
262262
263 if (!builtin.link_libc and builtin.abi == .msvc) {263 if (!builtin.link_libc and builtin.os.tag == .windows and (builtin.abi == .none or builtin.abi == .msvc)) {
264 @export(&_fltused, .{ .name = "_fltused", .linkage = common.linkage, .visibility = common.visibility });264 @export(&_fltused, .{ .name = "_fltused", .linkage = common.linkage, .visibility = common.visibility });
265 }265 }
266}266}
lib/compiler_rt/aulldiv.zig+1-1
...@@ -8,7 +8,7 @@ const common = @import("common.zig");...@@ -8,7 +8,7 @@ const common = @import("common.zig");
8pub const panic = common.panic;8pub const panic = common.panic;
99
10comptime {10comptime {
11 if (arch == .x86 and os == .windows and (abi == .msvc or abi == .itanium) and !builtin.link_libc) {11 if (arch == .x86 and common.want_windows_msvc_or_itanium_abi and !builtin.link_libc) {
12 // Don't let LLVM apply the stdcall name mangling on those MSVC builtins12 // Don't let LLVM apply the stdcall name mangling on those MSVC builtins
13 @export(&_alldiv, .{ .name = "\x01__alldiv", .linkage = common.linkage, .visibility = common.visibility });13 @export(&_alldiv, .{ .name = "\x01__alldiv", .linkage = common.linkage, .visibility = common.visibility });
14 @export(&_aulldiv, .{ .name = "\x01__aulldiv", .linkage = common.linkage, .visibility = common.visibility });14 @export(&_aulldiv, .{ .name = "\x01__aulldiv", .linkage = common.linkage, .visibility = common.visibility });
lib/compiler_rt/aullrem.zig+1-1
...@@ -8,7 +8,7 @@ const common = @import("common.zig");...@@ -8,7 +8,7 @@ const common = @import("common.zig");
8pub const panic = common.panic;8pub const panic = common.panic;
99
10comptime {10comptime {
11 if (arch == .x86 and os == .windows and (abi == .msvc or abi == .itanium) and !builtin.link_libc) {11 if (arch == .x86 and common.want_windows_msvc_or_itanium_abi and !builtin.link_libc) {
12 // Don't let LLVM apply the stdcall name mangling on those MSVC builtins12 // Don't let LLVM apply the stdcall name mangling on those MSVC builtins
13 @export(&_allrem, .{ .name = "\x01__allrem", .linkage = common.linkage, .visibility = common.visibility });13 @export(&_allrem, .{ .name = "\x01__allrem", .linkage = common.linkage, .visibility = common.visibility });
14 @export(&_aullrem, .{ .name = "\x01__aullrem", .linkage = common.linkage, .visibility = common.visibility });14 @export(&_aullrem, .{ .name = "\x01__aullrem", .linkage = common.linkage, .visibility = common.visibility });
lib/compiler_rt/common.zig+5
...@@ -52,6 +52,11 @@ pub const want_aeabi = switch (builtin.abi) {...@@ -52,6 +52,11 @@ pub const want_aeabi = switch (builtin.abi) {
52// Temporarily used for thumb-uefi until https://github.com/ziglang/zig/issues/21630 is addressed.52// Temporarily used for thumb-uefi until https://github.com/ziglang/zig/issues/21630 is addressed.
53pub const want_windows_arm_abi = builtin.cpu.arch.isArm() and (builtin.os.tag == .windows or builtin.os.tag == .uefi) and (builtin.abi.isGnu() or !builtin.link_libc);53pub const want_windows_arm_abi = builtin.cpu.arch.isArm() and (builtin.os.tag == .windows or builtin.os.tag == .uefi) and (builtin.abi.isGnu() or !builtin.link_libc);
5454
55pub const want_windows_msvc_or_itanium_abi = switch (builtin.abi) {
56 .none, .msvc, .itanium => builtin.os.tag == .windows,
57 else => false,
58};
59
55pub const want_ppc_abi = builtin.cpu.arch.isPowerPC();60pub const want_ppc_abi = builtin.cpu.arch.isPowerPC();
5661
57pub const want_float_exceptions = !builtin.cpu.arch.isWasm();62pub const want_float_exceptions = !builtin.cpu.arch.isWasm();