commit ebab5288c3240fc3298e2d94954a7117e3a8d557 (tree)
parent 0556a2ba53b8bbb1a60ff31d8dcdde78a8b16727
Author: Andrew Kelley <andrew@ziglang.org>
Date: Fri, 17 Jun 2022 18:22:11 -0700
compiler-rt: fix aeabi logic
Before, compiler-rt would have the wrong symbols for ARM targets.
Diffstat:
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/lib/compiler_rt/common.zig b/lib/compiler_rt/common.zig
@@ -4,7 +4,19 @@ const math = std.math;
const is_test = builtin.is_test;
pub const linkage: std.builtin.GlobalLinkage = if (builtin.is_test) .Internal else .Weak;
-pub const want_aeabi = builtin.cpu.arch.isARM() or builtin.cpu.arch.isThumb();
+pub const want_aeabi = switch (builtin.abi) {
+ .eabi,
+ .eabihf,
+ .musleabi,
+ .musleabihf,
+ .gnueabi,
+ .gnueabihf,
+ => switch (builtin.cpu.arch) {
+ .arm, .armeb, .thumb, .thumbeb => true,
+ else => false,
+ },
+ else => false,
+};
pub const want_ppc_abi = builtin.cpu.arch.isPPC() or builtin.cpu.arch.isPPC64();
pub const want_msvc_abi = builtin.abi == .msvc;
/// Example symbols: