diff options
| -rw-r--r-- | xmake/toolchains/zig/xmake.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/toolchains/zig/xmake.lua b/xmake/toolchains/zig/xmake.lua index e9d099782..7ae24eec4 100644 --- a/xmake/toolchains/zig/xmake.lua +++ b/xmake/toolchains/zig/xmake.lua @@ -135,6 +135,16 @@ toolchain("zig") -- init target local target = toolchain:cross() + + if target then + local tarch = target:match("^(.-)-") or target + if arch == "x86_64" and tarch ~= "x86_64" then + target = nil + elseif arch == "aarch64" and tarch ~= "aarch64" then + target = nil + end + end + if target == nil then if toolchain:is_plat("cross") then -- xmake f -p cross --toolchain=zig --cross=mips64el-linux-gnuabi64 |
