| author | |
| committer | |
| log | 4b99e3718b417b3f64f17014cfdc2d755b6c5f63 |
| tree | a0343e27b220a5cf958dc09847d92e02f2f496e1 |
| parent | 959a3612c26ba7cbed12ec981c77c9fab953c700 |
| signature |
https://github.com/ziglang/zig/issues/259614 files changed, 12 insertions(+), 5 deletions(-)
src/target.zig+2| ... | @@ -1,3 +1,4 @@ | ... | @@ -1,3 +1,4 @@ |
| 1 | const builtin = @import("builtin"); | ||
| 1 | const std = @import("std"); | 2 | const std = @import("std"); |
| 2 | const assert = std.debug.assert; | 3 | const assert = std.debug.assert; |
| 3 | 4 | ||
| ... | @@ -255,6 +256,7 @@ pub fn hasNewLinkerSupport(ofmt: std.Target.ObjectFormat, backend: std.builtin.C | ... | @@ -255,6 +256,7 @@ pub fn hasNewLinkerSupport(ofmt: std.Target.ObjectFormat, backend: std.builtin.C |
| 255 | /// debug mode. A given target should only return true here if it is passing greater | 256 | /// debug mode. A given target should only return true here if it is passing greater |
| 256 | /// than or equal to the number of behavior tests as the respective LLVM backend. | 257 | /// than or equal to the number of behavior tests as the respective LLVM backend. |
| 257 | pub fn selfHostedBackendIsAsRobustAsLlvm(target: *const std.Target) bool { | 258 | pub fn selfHostedBackendIsAsRobustAsLlvm(target: *const std.Target) bool { |
| 259 | if (comptime builtin.cpu.arch.endian() == .big) return false; // https://github.com/ziglang/zig/issues/25961 | ||
| 258 | if (target.cpu.arch.isSpirV()) return true; | 260 | if (target.cpu.arch.isSpirV()) return true; |
| 259 | if (target.cpu.arch == .x86_64 and target.ptrBitWidth() == 64) { | 261 | if (target.cpu.arch == .x86_64 and target.ptrBitWidth() == 64) { |
| 260 | if (target.os.tag == .illumos) { | 262 | if (target.os.tag == .illumos) { |
test/src/ErrorTrace.zig+1| ... | @@ -39,6 +39,7 @@ pub fn addCase(self: *ErrorTrace, case: Case) void { | ... | @@ -39,6 +39,7 @@ pub fn addCase(self: *ErrorTrace, case: Case) void { |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | fn shouldTestNonLlvm(target: *const std.Target) bool { | 41 | fn shouldTestNonLlvm(target: *const std.Target) bool { |
| 42 | if (comptime builtin.cpu.arch.endian() == .big) return false; // https://github.com/ziglang/zig/issues/25961 | ||
| 42 | return switch (target.cpu.arch) { | 43 | return switch (target.cpu.arch) { |
| 43 | .x86_64 => switch (target.ofmt) { | 44 | .x86_64 => switch (target.ofmt) { |
| 44 | .elf => !target.os.tag.isBSD() and target.os.tag != .illumos, | 45 | .elf => !target.os.tag.isBSD() and target.os.tag != .illumos, |
test/src/StackTrace.zig+8-5| ... | @@ -44,12 +44,15 @@ fn addCaseTarget( | ... | @@ -44,12 +44,15 @@ fn addCaseTarget( |
| 44 | target: *const std.Build.ResolvedTarget, | 44 | target: *const std.Build.ResolvedTarget, |
| 45 | triple: ?[]const u8, | 45 | triple: ?[]const u8, |
| 46 | ) void { | 46 | ) void { |
| 47 | const both_backends = switch (target.result.cpu.arch) { | 47 | const both_backends = b: { |
| 48 | .x86_64 => switch (target.result.ofmt) { | 48 | if (comptime builtin.cpu.arch.endian() == .big) break :b false; // https://github.com/ziglang/zig/issues/25961 |
| 49 | .elf => !target.result.os.tag.isBSD() and target.result.os.tag != .illumos, | 49 | break :b switch (target.result.cpu.arch) { |
| 50 | .x86_64 => switch (target.result.ofmt) { | ||
| 51 | .elf => !target.result.os.tag.isBSD() and target.result.os.tag != .illumos, | ||
| 52 | else => false, | ||
| 53 | }, | ||
| 50 | else => false, | 54 | else => false, |
| 51 | }, | 55 | }; |
| 52 | else => false, | ||
| 53 | }; | 56 | }; |
| 54 | const both_pie = switch (target.result.os.tag) { | 57 | const both_pie = switch (target.result.os.tag) { |
| 55 | .fuchsia, .openbsd => false, | 58 | .fuchsia, .openbsd => false, |
test/tests.zig+1| ... | @@ -2500,6 +2500,7 @@ fn addOneModuleTest( | ... | @@ -2500,6 +2500,7 @@ fn addOneModuleTest( |
| 2500 | } | 2500 | } |
| 2501 | 2501 | ||
| 2502 | pub fn wouldUseLlvm(use_llvm: ?bool, query: std.Target.Query, optimize_mode: OptimizeMode) bool { | 2502 | pub fn wouldUseLlvm(use_llvm: ?bool, query: std.Target.Query, optimize_mode: OptimizeMode) bool { |
| 2503 | if (comptime builtin.cpu.arch.endian() == .big) return true; // https://github.com/ziglang/zig/issues/25961 | ||
| 2503 | if (use_llvm) |x| return x; | 2504 | if (use_llvm) |x| return x; |
| 2504 | if (query.ofmt == .c) return false; | 2505 | if (query.ofmt == .c) return false; |
| 2505 | switch (optimize_mode) { | 2506 | switch (optimize_mode) { |