authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-09-13 17:54:31+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-09-30 13:44:54+01:00
log2fefe0e4b39ab6f86e5af423304b8a7b2da5fe72
tree4201d6170dfb7568298c0365747c73e3cf344f1c
parentf5c8d80e08fac9dcf2eb88941d68b44640a4c9b4
signaturelock-open Commit is signed but in an unrecognized format.

tests: fix 32-bit compatible arch selection


1 files changed, 18 insertions(+), 10 deletions(-)

test/tests.zig+18-10
...@@ -1866,18 +1866,26 @@ fn nativeAndCompatible32bit(b: *std.Build, skip_non_native: bool) []const std.Bu...@@ -1866,18 +1866,26 @@ fn nativeAndCompatible32bit(b: *std.Build, skip_non_native: bool) []const std.Bu
1866 const host = b.graph.host.result;1866 const host = b.graph.host.result;
1867 const only_native = (&b.graph.host)[0..1];1867 const only_native = (&b.graph.host)[0..1];
1868 if (skip_non_native) return only_native;1868 if (skip_non_native) return only_native;
1869 const arch32: std.Target.Cpu.Arch = switch (host.cpu.arch) {1869 const arch32: std.Target.Cpu.Arch = switch (host.os.tag) {
1870 .x86_64 => .x86,1870 .windows => switch (host.cpu.arch) {
1871 .aarch64 => .arm,1871 .x86_64 => .x86,
1872 .aarch64_be => .armeb,1872 .aarch64 => .thumb,
1873 .aarch64_be => .thumbeb,
1874 else => return only_native,
1875 },
1876 .freebsd => switch (host.cpu.arch) {
1877 .aarch64 => .arm,
1878 .aarch64_be => .armeb,
1879 else => return only_native,
1880 },
1881 .linux, .netbsd => switch (host.cpu.arch) {
1882 .x86_64 => .x86,
1883 .aarch64 => .arm,
1884 .aarch64_be => .armeb,
1885 else => return only_native,
1886 },
1873 else => return only_native,1887 else => return only_native,
1874 };1888 };
1875 switch (host.os.tag) {
1876 .windows => if (arch32.isArm()) return only_native,
1877 .macos, .freebsd => if (arch32 == .x86) return only_native,
1878 .linux, .netbsd => {},
1879 else => return only_native,
1880 }
1881 return b.graph.arena.dupe(std.Build.ResolvedTarget, &.{1889 return b.graph.arena.dupe(std.Build.ResolvedTarget, &.{
1882 b.graph.host,1890 b.graph.host,
1883 b.resolveTargetQuery(.{ .cpu_arch = arch32, .os_tag = host.os.tag }),1891 b.resolveTargetQuery(.{ .cpu_arch = arch32, .os_tag = host.os.tag }),