aboutsummaryrefslogtreecommitdiff
path: root/lib/std/testing.zig
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-05-20 02:44:52 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2025-05-20 10:23:16 +0200
commit999777e73aa1bd06b05cbe53f8c2488877e18874 (patch)
tree2a12be70cf488ace84478c9f9f583dc50bfa9717 /lib/std/testing.zig
parentd000e53b291afc40da7d676553f1c9685a38f169 (diff)
downloadzig-999777e73aa1bd06b05cbe53f8c2488877e18874.tar.gz
zig-999777e73aa1bd06b05cbe53f8c2488877e18874.zip
compiler: Scaffold stage2_powerpc backend.
Nothing interesting here; literally just the bare minimum so I can work on this on and off in a branch without worrying about merge conflicts in the non-backend code.
Diffstat (limited to 'lib/std/testing.zig')
-rw-r--r--lib/std/testing.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/std/testing.zig b/lib/std/testing.zig
index a3b14d18bd..9bad5826a2 100644
--- a/lib/std/testing.zig
+++ b/lib/std/testing.zig
@@ -32,7 +32,13 @@ pub var allocator_instance: std.heap.GeneralPurposeAllocator(.{
pub var log_level = std.log.Level.warn;
// Disable printing in tests for simple backends.
-pub const backend_can_print = !(builtin.zig_backend == .stage2_spirv64 or builtin.zig_backend == .stage2_riscv64);
+pub const backend_can_print = switch (builtin.zig_backend) {
+ .stage2_powerpc,
+ .stage2_riscv64,
+ .stage2_spirv64,
+ => false,
+ else => true,
+};
fn print(comptime fmt: []const u8, args: anytype) void {
if (@inComptime()) {