diff options
| author | LemonBoy <thatlemon@gmail.com> | 2021-04-21 19:00:57 +0200 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2021-04-21 19:00:57 +0200 |
| commit | e0d7cfce5f5ae83e3eef5242d60dd2d4a1f9e5cc (patch) | |
| tree | 4265510c3df99b963a4ba39255a1a9d5ef182290 /lib | |
| parent | 89d0cc4d8c222321939a87ede1cf7e4c6656d4cf (diff) | |
| download | zig-e0d7cfce5f5ae83e3eef5242d60dd2d4a1f9e5cc.tar.gz zig-e0d7cfce5f5ae83e3eef5242d60dd2d4a1f9e5cc.zip | |
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 (limited to 'lib')
| -rw-r--r-- | lib/std/special/compiler_rt.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/special/compiler_rt.zig b/lib/std/special/compiler_rt.zig index 3a7457a4fd..5d95724a5f 100644 --- 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 }); |
