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.
This commit is contained in:
LemonBoy 2021-04-21 19:00:57 +02:00
parent 89d0cc4d8c
commit e0d7cfce5f

View File

@ -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 });