| author | |
| committer | |
| log | 358ee859bae5baa87bcff1fabfde87fe2aa1ab52 |
| tree | 6b1038f1d0e119004b7275988fa0d0e3e8db0ffd |
| parent | 7cae6b8fa78a75b62c5e2a69afda95b3c3824a5b |
| signature |
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 | } |
| 262 | 262 | ||
| 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"); |
| 8 | pub const panic = common.panic; | 8 | pub const panic = common.panic; |
| 9 | 9 | ||
| 10 | comptime { | 10 | comptime { |
| 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 builtins | 12 | // 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"); |
| 8 | pub const panic = common.panic; | 8 | pub const panic = common.panic; |
| 9 | 9 | ||
| 10 | comptime { | 10 | comptime { |
| 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 builtins | 12 | // 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. |
| 53 | pub 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); | 53 | pub 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); |
| 54 | 54 | ||
| 55 | pub const want_windows_msvc_or_itanium_abi = switch (builtin.abi) { | ||
| 56 | .none, .msvc, .itanium => builtin.os.tag == .windows, | ||
| 57 | else => false, | ||
| 58 | }; | ||
| 59 | |||
| 55 | pub const want_ppc_abi = builtin.cpu.arch.isPowerPC(); | 60 | pub const want_ppc_abi = builtin.cpu.arch.isPowerPC(); |
| 56 | 61 | ||
| 57 | pub const want_float_exceptions = !builtin.cpu.arch.isWasm(); | 62 | pub const want_float_exceptions = !builtin.cpu.arch.isWasm(); |