diff --git a/src/target.zig b/src/target.zig index a721b0bf65..7e50589ab8 100644 --- a/src/target.zig +++ b/src/target.zig @@ -1,3 +1,4 @@ +const builtin = @import("builtin"); const std = @import("std"); const assert = std.debug.assert; @@ -255,6 +256,7 @@ pub fn hasNewLinkerSupport(ofmt: std.Target.ObjectFormat, backend: std.builtin.C /// debug mode. A given target should only return true here if it is passing greater /// than or equal to the number of behavior tests as the respective LLVM backend. pub fn selfHostedBackendIsAsRobustAsLlvm(target: *const std.Target) bool { + if (comptime builtin.cpu.arch.endian() == .big) return false; // https://github.com/ziglang/zig/issues/25961 if (target.cpu.arch.isSpirV()) return true; if (target.cpu.arch == .x86_64 and target.ptrBitWidth() == 64) { if (target.os.tag == .illumos) { diff --git a/test/src/ErrorTrace.zig b/test/src/ErrorTrace.zig index bd3febef0e..f6f80f8b13 100644 --- a/test/src/ErrorTrace.zig +++ b/test/src/ErrorTrace.zig @@ -39,6 +39,7 @@ pub fn addCase(self: *ErrorTrace, case: Case) void { } fn shouldTestNonLlvm(target: *const std.Target) bool { + if (comptime builtin.cpu.arch.endian() == .big) return false; // https://github.com/ziglang/zig/issues/25961 return switch (target.cpu.arch) { .x86_64 => switch (target.ofmt) { .elf => !target.os.tag.isBSD() and target.os.tag != .illumos, diff --git a/test/src/StackTrace.zig b/test/src/StackTrace.zig index 8b2d514010..57e29dd800 100644 --- a/test/src/StackTrace.zig +++ b/test/src/StackTrace.zig @@ -44,12 +44,15 @@ fn addCaseTarget( target: *const std.Build.ResolvedTarget, triple: ?[]const u8, ) void { - const both_backends = switch (target.result.cpu.arch) { - .x86_64 => switch (target.result.ofmt) { - .elf => !target.result.os.tag.isBSD() and target.result.os.tag != .illumos, + const both_backends = b: { + if (comptime builtin.cpu.arch.endian() == .big) break :b false; // https://github.com/ziglang/zig/issues/25961 + break :b switch (target.result.cpu.arch) { + .x86_64 => switch (target.result.ofmt) { + .elf => !target.result.os.tag.isBSD() and target.result.os.tag != .illumos, + else => false, + }, else => false, - }, - else => false, + }; }; const both_pie = switch (target.result.os.tag) { .fuchsia, .openbsd => false, diff --git a/test/tests.zig b/test/tests.zig index 1f9db5f2dd..344f598f2e 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -2500,6 +2500,7 @@ fn addOneModuleTest( } pub fn wouldUseLlvm(use_llvm: ?bool, query: std.Target.Query, optimize_mode: OptimizeMode) bool { + if (comptime builtin.cpu.arch.endian() == .big) return true; // https://github.com/ziglang/zig/issues/25961 if (use_llvm) |x| return x; if (query.ofmt == .c) return false; switch (optimize_mode) {