summaryrefslogtreecommitdiff
path: root/xmake/toolchains/zig/xmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/toolchains/zig/xmake.lua')
-rw-r--r--xmake/toolchains/zig/xmake.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/xmake/toolchains/zig/xmake.lua b/xmake/toolchains/zig/xmake.lua
index 98c4e256a..c8c23408e 100644
--- a/xmake/toolchains/zig/xmake.lua
+++ b/xmake/toolchains/zig/xmake.lua
@@ -137,7 +137,20 @@ toolchain("zig")
local target = toolchain:cross()
if target then
- local tarch = target:match("^(.-)-") or target
+ local tarch = target:split("%-")[1] or target
+
+ if arch == "i686" then
+ arch = "i386"
+ elseif arch == "aarch64" then
+ arch = "arm64"
+ end
+
+ if tarch == "i686" then
+ tarch = "i386"
+ elseif tarch == "aarch64" then
+ tarch = "arm64"
+ end
+
if arch ~= tarch then
target = nil
end