mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
getExternalExecutor: fix aarch64 windows
std.zig.system.NativeTargetInfo.getExternalExecutor previously would incorrectly communicate that wine could be used to run aarch64-windows binaries on x86_64-linux, and x86_64-windows binaries on aarch64-linux. Neither of these things are true.
This commit is contained in:
parent
98299e7787
commit
ef5f8bd7c6
@ -1090,6 +1090,11 @@ pub fn getExternalExecutor(
|
||||
switch (candidate.target.os.tag) {
|
||||
.windows => {
|
||||
if (options.allow_wine) {
|
||||
// x86_64 wine does not support emulating aarch64-windows and
|
||||
// vice versa.
|
||||
if (candidate.target.cpu.arch != builtin.cpu.arch) {
|
||||
return bad_result;
|
||||
}
|
||||
switch (candidate.target.cpu.arch.ptrBitWidth()) {
|
||||
32 => return Executor{ .wine = "wine" },
|
||||
64 => return Executor{ .wine = "wine64" },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user