| author | |
| committer | |
| log | 05a877a9a11c401c42d6c0935641a010394f3fb5 |
| tree | 058dde6bb946dafb22b679a27f43ec227bb6c141 |
| parent | 8ba3812eeedec643dd045e0fecb8a6697f6253db |
| signature |
10 files changed, 17 insertions(+), 45 deletions(-)
lib/compiler_rt/arm.zig+4-4| ... | @@ -15,11 +15,11 @@ comptime { | ... | @@ -15,11 +15,11 @@ comptime { |
| 15 | @export(&__aeabi_unwind_cpp_pr1, .{ .name = "__aeabi_unwind_cpp_pr1", .linkage = common.linkage, .visibility = common.visibility }); | 15 | @export(&__aeabi_unwind_cpp_pr1, .{ .name = "__aeabi_unwind_cpp_pr1", .linkage = common.linkage, .visibility = common.visibility }); |
| 16 | @export(&__aeabi_unwind_cpp_pr2, .{ .name = "__aeabi_unwind_cpp_pr2", .linkage = common.linkage, .visibility = common.visibility }); | 16 | @export(&__aeabi_unwind_cpp_pr2, .{ .name = "__aeabi_unwind_cpp_pr2", .linkage = common.linkage, .visibility = common.visibility }); |
| 17 | 17 | ||
| 18 | @export(&__aeabi_ldivmod, .{ .name = if (target.isMinGW()) "__rt_sdiv64" else "__aeabi_ldivmod", .linkage = common.linkage, .visibility = common.visibility }); | 18 | @export(&__aeabi_ldivmod, .{ .name = if (common.want_windows_arm_abi) "__rt_sdiv64" else "__aeabi_ldivmod", .linkage = common.linkage, .visibility = common.visibility }); |
| 19 | @export(&__aeabi_uldivmod, .{ .name = if (target.isMinGW()) "__rt_udiv64" else "__aeabi_uldivmod", .linkage = common.linkage, .visibility = common.visibility }); | 19 | @export(&__aeabi_uldivmod, .{ .name = if (common.want_windows_arm_abi) "__rt_udiv64" else "__aeabi_uldivmod", .linkage = common.linkage, .visibility = common.visibility }); |
| 20 | 20 | ||
| 21 | @export(&__aeabi_idivmod, .{ .name = if (target.isMinGW()) "__rt_sdiv" else "__aeabi_idivmod", .linkage = common.linkage, .visibility = common.visibility }); | 21 | @export(&__aeabi_idivmod, .{ .name = if (common.want_windows_arm_abi) "__rt_sdiv" else "__aeabi_idivmod", .linkage = common.linkage, .visibility = common.visibility }); |
| 22 | @export(&__aeabi_uidivmod, .{ .name = if (target.isMinGW()) "__rt_udiv" else "__aeabi_uidivmod", .linkage = common.linkage, .visibility = common.visibility }); | 22 | @export(&__aeabi_uidivmod, .{ .name = if (common.want_windows_arm_abi) "__rt_udiv" else "__aeabi_uidivmod", .linkage = common.linkage, .visibility = common.visibility }); |
| 23 | 23 | ||
| 24 | @export(&__aeabi_memcpy, .{ .name = "__aeabi_memcpy", .linkage = common.linkage, .visibility = common.visibility }); | 24 | @export(&__aeabi_memcpy, .{ .name = "__aeabi_memcpy", .linkage = common.linkage, .visibility = common.visibility }); |
| 25 | @export(&__aeabi_memcpy4, .{ .name = "__aeabi_memcpy4", .linkage = common.linkage, .visibility = common.visibility }); | 25 | @export(&__aeabi_memcpy4, .{ .name = "__aeabi_memcpy4", .linkage = common.linkage, .visibility = common.visibility }); |
lib/compiler_rt/common.zig+5-1| ... | @@ -9,11 +9,13 @@ else if (ofmt_c) | ... | @@ -9,11 +9,13 @@ else if (ofmt_c) |
| 9 | .strong | 9 | .strong |
| 10 | else | 10 | else |
| 11 | .weak; | 11 | .weak; |
| 12 | |||
| 12 | /// Determines the symbol's visibility to other objects. | 13 | /// Determines the symbol's visibility to other objects. |
| 13 | /// For WebAssembly this allows the symbol to be resolved to other modules, but will not | 14 | /// For WebAssembly this allows the symbol to be resolved to other modules, but will not |
| 14 | /// export it to the host runtime. | 15 | /// export it to the host runtime. |
| 15 | pub const visibility: std.builtin.SymbolVisibility = | 16 | pub const visibility: std.builtin.SymbolVisibility = |
| 16 | if (builtin.target.isWasm() and linkage != .internal) .hidden else .default; | 17 | if (builtin.target.isWasm() and linkage != .internal) .hidden else .default; |
| 18 | |||
| 17 | pub const want_aeabi = switch (builtin.abi) { | 19 | pub const want_aeabi = switch (builtin.abi) { |
| 18 | .eabi, | 20 | .eabi, |
| 19 | .eabihf, | 21 | .eabihf, |
| ... | @@ -29,7 +31,9 @@ pub const want_aeabi = switch (builtin.abi) { | ... | @@ -29,7 +31,9 @@ pub const want_aeabi = switch (builtin.abi) { |
| 29 | }, | 31 | }, |
| 30 | else => false, | 32 | else => false, |
| 31 | }; | 33 | }; |
| 32 | pub const want_mingw_arm_abi = builtin.cpu.arch.isArm() and builtin.target.isMinGW(); | 34 | |
| 35 | /// These functions are provided by libc when targeting MSVC, but not MinGW. | ||
| 36 | pub const want_windows_arm_abi = builtin.cpu.arch.isArm() and builtin.os.tag == .windows and (builtin.abi.isGnu() or !builtin.link_libc); | ||
| 33 | 37 | ||
| 34 | pub const want_ppc_abi = builtin.cpu.arch.isPowerPC(); | 38 | pub const want_ppc_abi = builtin.cpu.arch.isPowerPC(); |
| 35 | 39 |
lib/compiler_rt/fixdfdi.zig+1-5| ... | @@ -8,11 +8,7 @@ comptime { | ... | @@ -8,11 +8,7 @@ comptime { |
| 8 | if (common.want_aeabi) { | 8 | if (common.want_aeabi) { |
| 9 | @export(&__aeabi_d2lz, .{ .name = "__aeabi_d2lz", .linkage = common.linkage, .visibility = common.visibility }); | 9 | @export(&__aeabi_d2lz, .{ .name = "__aeabi_d2lz", .linkage = common.linkage, .visibility = common.visibility }); |
| 10 | } else { | 10 | } else { |
| 11 | @export(&__fixdfdi, .{ .name = "__fixdfdi", .linkage = common.linkage, .visibility = common.visibility }); | 11 | @export(&__fixdfdi, .{ .name = if (common.want_windows_arm_abi) "__dtoi64" else "__fixdfdi", .linkage = common.linkage, .visibility = common.visibility }); |
| 12 | |||
| 13 | if (common.want_mingw_arm_abi) { | ||
| 14 | @export(&__fixdfdi, .{ .name = "__dtoi64", .linkage = common.linkage, .visibility = common.visibility }); | ||
| 15 | } | ||
| 16 | } | 12 | } |
| 17 | } | 13 | } |
| 18 | 14 |
lib/compiler_rt/fixsfdi.zig+1-5| ... | @@ -8,11 +8,7 @@ comptime { | ... | @@ -8,11 +8,7 @@ comptime { |
| 8 | if (common.want_aeabi) { | 8 | if (common.want_aeabi) { |
| 9 | @export(&__aeabi_f2lz, .{ .name = "__aeabi_f2lz", .linkage = common.linkage, .visibility = common.visibility }); | 9 | @export(&__aeabi_f2lz, .{ .name = "__aeabi_f2lz", .linkage = common.linkage, .visibility = common.visibility }); |
| 10 | } else { | 10 | } else { |
| 11 | @export(&__fixsfdi, .{ .name = "__fixsfdi", .linkage = common.linkage, .visibility = common.visibility }); | 11 | @export(&__fixsfdi, .{ .name = if (common.want_windows_arm_abi) "__stoi64" else "__fixsfdi", .linkage = common.linkage, .visibility = common.visibility }); |
| 12 | |||
| 13 | if (common.want_mingw_arm_abi) { | ||
| 14 | @export(&__fixsfdi, .{ .name = "__stoi64", .linkage = common.linkage, .visibility = common.visibility }); | ||
| 15 | } | ||
| 16 | } | 12 | } |
| 17 | } | 13 | } |
| 18 | 14 |
lib/compiler_rt/fixunsdfdi.zig+1-5| ... | @@ -8,11 +8,7 @@ comptime { | ... | @@ -8,11 +8,7 @@ comptime { |
| 8 | if (common.want_aeabi) { | 8 | if (common.want_aeabi) { |
| 9 | @export(&__aeabi_d2ulz, .{ .name = "__aeabi_d2ulz", .linkage = common.linkage, .visibility = common.visibility }); | 9 | @export(&__aeabi_d2ulz, .{ .name = "__aeabi_d2ulz", .linkage = common.linkage, .visibility = common.visibility }); |
| 10 | } else { | 10 | } else { |
| 11 | @export(&__fixunsdfdi, .{ .name = "__fixunsdfdi", .linkage = common.linkage, .visibility = common.visibility }); | 11 | @export(&__fixunsdfdi, .{ .name = if (common.want_windows_arm_abi) "__dtou64" else "__fixunsdfdi", .linkage = common.linkage, .visibility = common.visibility }); |
| 12 | |||
| 13 | if (common.want_mingw_arm_abi) { | ||
| 14 | @export(&__fixunsdfdi, .{ .name = "__dtou64", .linkage = common.linkage, .visibility = common.visibility }); | ||
| 15 | } | ||
| 16 | } | 12 | } |
| 17 | } | 13 | } |
| 18 | 14 |
lib/compiler_rt/fixunssfdi.zig+1-5| ... | @@ -8,11 +8,7 @@ comptime { | ... | @@ -8,11 +8,7 @@ comptime { |
| 8 | if (common.want_aeabi) { | 8 | if (common.want_aeabi) { |
| 9 | @export(&__aeabi_f2ulz, .{ .name = "__aeabi_f2ulz", .linkage = common.linkage, .visibility = common.visibility }); | 9 | @export(&__aeabi_f2ulz, .{ .name = "__aeabi_f2ulz", .linkage = common.linkage, .visibility = common.visibility }); |
| 10 | } else { | 10 | } else { |
| 11 | @export(&__fixunssfdi, .{ .name = "__fixunssfdi", .linkage = common.linkage, .visibility = common.visibility }); | 11 | @export(&__fixunssfdi, .{ .name = if (common.want_windows_arm_abi) "__stou64" else "__fixunssfdi", .linkage = common.linkage, .visibility = common.visibility }); |
| 12 | |||
| 13 | if (common.want_mingw_arm_abi) { | ||
| 14 | @export(&__fixunssfdi, .{ .name = "__stou64", .linkage = common.linkage, .visibility = common.visibility }); | ||
| 15 | } | ||
| 16 | } | 12 | } |
| 17 | } | 13 | } |
| 18 | 14 |
lib/compiler_rt/floatdidf.zig+1-5| ... | @@ -8,11 +8,7 @@ comptime { | ... | @@ -8,11 +8,7 @@ comptime { |
| 8 | if (common.want_aeabi) { | 8 | if (common.want_aeabi) { |
| 9 | @export(&__aeabi_l2d, .{ .name = "__aeabi_l2d", .linkage = common.linkage, .visibility = common.visibility }); | 9 | @export(&__aeabi_l2d, .{ .name = "__aeabi_l2d", .linkage = common.linkage, .visibility = common.visibility }); |
| 10 | } else { | 10 | } else { |
| 11 | @export(&__floatdidf, .{ .name = "__floatdidf", .linkage = common.linkage, .visibility = common.visibility }); | 11 | @export(&__floatdidf, .{ .name = if (common.want_windows_arm_abi) "__i64tod" else "__floatdidf", .linkage = common.linkage, .visibility = common.visibility }); |
| 12 | |||
| 13 | if (common.want_mingw_arm_abi) { | ||
| 14 | @export(&__floatdidf, .{ .name = "__i64tod", .linkage = common.linkage, .visibility = common.visibility }); | ||
| 15 | } | ||
| 16 | } | 12 | } |
| 17 | } | 13 | } |
| 18 | 14 |
lib/compiler_rt/floatdisf.zig+1-5| ... | @@ -8,11 +8,7 @@ comptime { | ... | @@ -8,11 +8,7 @@ comptime { |
| 8 | if (common.want_aeabi) { | 8 | if (common.want_aeabi) { |
| 9 | @export(&__aeabi_l2f, .{ .name = "__aeabi_l2f", .linkage = common.linkage, .visibility = common.visibility }); | 9 | @export(&__aeabi_l2f, .{ .name = "__aeabi_l2f", .linkage = common.linkage, .visibility = common.visibility }); |
| 10 | } else { | 10 | } else { |
| 11 | @export(&__floatdisf, .{ .name = "__floatdisf", .linkage = common.linkage, .visibility = common.visibility }); | 11 | @export(&__floatdisf, .{ .name = if (common.want_windows_arm_abi) "__i64tos" else "__floatdisf", .linkage = common.linkage, .visibility = common.visibility }); |
| 12 | |||
| 13 | if (common.want_mingw_arm_abi) { | ||
| 14 | @export(&__floatdisf, .{ .name = "__i64tos", .linkage = common.linkage, .visibility = common.visibility }); | ||
| 15 | } | ||
| 16 | } | 12 | } |
| 17 | } | 13 | } |
| 18 | 14 |
lib/compiler_rt/floatundidf.zig+1-5| ... | @@ -8,11 +8,7 @@ comptime { | ... | @@ -8,11 +8,7 @@ comptime { |
| 8 | if (common.want_aeabi) { | 8 | if (common.want_aeabi) { |
| 9 | @export(&__aeabi_ul2d, .{ .name = "__aeabi_ul2d", .linkage = common.linkage, .visibility = common.visibility }); | 9 | @export(&__aeabi_ul2d, .{ .name = "__aeabi_ul2d", .linkage = common.linkage, .visibility = common.visibility }); |
| 10 | } else { | 10 | } else { |
| 11 | @export(&__floatundidf, .{ .name = "__floatundidf", .linkage = common.linkage, .visibility = common.visibility }); | 11 | @export(&__floatundidf, .{ .name = if (common.want_windows_arm_abi) "__u64tod" else "__floatundidf", .linkage = common.linkage, .visibility = common.visibility }); |
| 12 | |||
| 13 | if (common.want_mingw_arm_abi) { | ||
| 14 | @export(&__floatundidf, .{ .name = "__u64tod", .linkage = common.linkage, .visibility = common.visibility }); | ||
| 15 | } | ||
| 16 | } | 12 | } |
| 17 | } | 13 | } |
| 18 | 14 |
lib/compiler_rt/floatundisf.zig+1-5| ... | @@ -8,11 +8,7 @@ comptime { | ... | @@ -8,11 +8,7 @@ comptime { |
| 8 | if (common.want_aeabi) { | 8 | if (common.want_aeabi) { |
| 9 | @export(&__aeabi_ul2f, .{ .name = "__aeabi_ul2f", .linkage = common.linkage, .visibility = common.visibility }); | 9 | @export(&__aeabi_ul2f, .{ .name = "__aeabi_ul2f", .linkage = common.linkage, .visibility = common.visibility }); |
| 10 | } else { | 10 | } else { |
| 11 | @export(&__floatundisf, .{ .name = "__floatundisf", .linkage = common.linkage, .visibility = common.visibility }); | 11 | @export(&__floatundisf, .{ .name = if (common.want_windows_arm_abi) "__u64tos" else "__floatundisf", .linkage = common.linkage, .visibility = common.visibility }); |
| 12 | |||
| 13 | if (common.want_mingw_arm_abi) { | ||
| 14 | @export(&__floatundisf, .{ .name = "__u64tos", .linkage = common.linkage, .visibility = common.visibility }); | ||
| 15 | } | ||
| 16 | } | 12 | } |
| 17 | } | 13 | } |
| 18 | 14 |