mirror of
https://github.com/ziglang/zig.git
synced 2025-12-18 04:03:14 +00:00
std.zig.system: Fix wine executable name in getExternalExecutor().
I'm not actually aware of any distro where the name is wine64, so just use wine in all cases. As part of this, I also fixed the architecture checks to match reality. Closes #23411.
This commit is contained in:
parent
1b62a22268
commit
55ee88f9c0
@ -128,19 +128,17 @@ pub fn getExternalExecutor(
|
|||||||
switch (candidate.os.tag) {
|
switch (candidate.os.tag) {
|
||||||
.windows => {
|
.windows => {
|
||||||
if (options.allow_wine) {
|
if (options.allow_wine) {
|
||||||
// x86_64 wine does not support emulating aarch64-windows and
|
const wine_supported = switch (candidate.cpu.arch) {
|
||||||
// vice versa.
|
.thumb => switch (host.cpu.arch) {
|
||||||
if (candidate.cpu.arch != builtin.cpu.arch and
|
.arm, .thumb, .aarch64 => true,
|
||||||
!(candidate.cpu.arch == .thumb and builtin.cpu.arch == .aarch64) and
|
else => false,
|
||||||
!(candidate.cpu.arch == .x86 and builtin.cpu.arch == .x86_64))
|
},
|
||||||
{
|
.aarch64 => host.cpu.arch == .aarch64,
|
||||||
return bad_result;
|
.x86 => host.cpu.arch.isX86(),
|
||||||
}
|
.x86_64 => host.cpu.arch == .x86_64,
|
||||||
switch (candidate.ptrBitWidth()) {
|
else => false,
|
||||||
32 => return Executor{ .wine = "wine" },
|
};
|
||||||
64 => return Executor{ .wine = "wine64" },
|
return if (wine_supported) Executor{ .wine = "wine" } else bad_result;
|
||||||
else => return bad_result,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return bad_result;
|
return bad_result;
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user