std.zig.system: handle alpha, hppa, microblaze, sh in getExternalExecutor()

This commit is contained in:
Alex Rønne Petersen 2025-10-20 03:46:11 +02:00
parent d8cb8b7bae
commit 07d764dc30
No known key found for this signature in database

View File

@ -100,10 +100,14 @@ pub fn getExternalExecutor(
else => bad_result,
},
inline .aarch64_be,
.alpha,
.armeb,
.hexagon,
.hppa,
.loongarch64,
.m68k,
.microblaze,
.microblazeel,
.mips,
.mipsel,
.mips64,
@ -114,6 +118,8 @@ pub fn getExternalExecutor(
.powerpc64le,
.riscv32,
.s390x,
.sh,
.sheb,
.sparc,
.sparc64,
.thumb,
@ -122,19 +128,24 @@ pub fn getExternalExecutor(
.xtensaeb,
=> |t| switch (candidate.os.tag) {
.linux,
=> .{ .qemu = switch (t) {
.powerpc => "qemu-ppc",
.powerpc64 => "qemu-ppc64",
.powerpc64le => "qemu-ppc64le",
.mips64, .mips64el => switch (candidate.abi) {
.gnuabin32, .muslabin32 => if (t == .mips64el) "qemu-mipsn32el" else "qemu-mipsn32",
=> .{
.qemu = switch (t) {
.powerpc => "qemu-ppc",
.powerpc64 => "qemu-ppc64",
.powerpc64le => "qemu-ppc64le",
.mips64, .mips64el => switch (candidate.abi) {
.gnuabin32, .muslabin32 => if (t == .mips64el) "qemu-mipsn32el" else "qemu-mipsn32",
else => "qemu-" ++ @tagName(t),
},
// TODO: Actually check the SuperH version.
.sh => "qemu-sh4",
.sheb => "qemu-sh4eb",
.sparc => if (candidate.cpu.has(.sparc, .v8plus)) "qemu-sparc32plus" else "qemu-sparc",
.thumb => "qemu-arm",
.thumbeb => "qemu-armeb",
else => "qemu-" ++ @tagName(t),
},
.sparc => if (candidate.cpu.has(.sparc, .v8plus)) "qemu-sparc32plus" else "qemu-sparc",
.thumb => "qemu-arm",
.thumbeb => "qemu-armeb",
else => "qemu-" ++ @tagName(t),
} },
},
else => bad_result,
},
else => bad_result,