commit e0d7cfce5f5ae83e3eef5242d60dd2d4a1f9e5cc (tree)
parent 89d0cc4d8c222321939a87ede1cf7e4c6656d4cf
Author: LemonBoy <thatlemon@gmail.com>
Date: Wed, 21 Apr 2021 19:00:57 +0200
compiler-rt: Don't re-define PPC builtins in test mode
Prevent linking errors when `zig test`-ing the compiler_rt module for
powerpc-linux triples.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/std/special/compiler_rt.zig b/lib/std/special/compiler_rt.zig
@@ -296,7 +296,7 @@ comptime {
@export(@import("compiler_rt/sparc.zig")._Qp_qtod, .{ .name = "_Qp_qtod", .linkage = linkage });
}
- if (builtin.arch == .powerpc or builtin.arch.isPPC64()) {
+ if ((builtin.arch == .powerpc or builtin.arch.isPPC64()) and !is_test) {
@export(@import("compiler_rt/addXf3.zig").__addtf3, .{ .name = "__addkf3", .linkage = linkage });
@export(@import("compiler_rt/addXf3.zig").__subtf3, .{ .name = "__subkf3", .linkage = linkage });
@export(@import("compiler_rt/mulXf3.zig").__multf3, .{ .name = "__mulkf3", .linkage = linkage });