From a6ebbeecfd5d6ebe084ac5d3d45e1358e89110d3 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 31 Jan 2026 00:55:07 +0800 Subject: add target flags for cross-compilation --- xmake/toolchains/zig/xmake.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xmake/toolchains/zig/xmake.lua') diff --git a/xmake/toolchains/zig/xmake.lua b/xmake/toolchains/zig/xmake.lua index 72e4b943f..d1b2165e4 100644 --- a/xmake/toolchains/zig/xmake.lua +++ b/xmake/toolchains/zig/xmake.lua @@ -78,7 +78,6 @@ toolchain("zig") on_load(function (toolchain) import("core.base.semver") - import("private.core.base.is_cross") -- set toolset -- we patch target to `zig cc` to fix has_flags. see https://github.com/xmake-io/xmake/issues/955#issuecomment-766929692 @@ -110,7 +109,7 @@ toolchain("zig") -- get target from cross only for cross-compilation -- @see https://github.com/xmake-io/xmake/issues/7180 local target - if not target and is_cross(toolchain:plat(), toolchain:arch()) then + if not target and toolchain:is_cross() then target = toolchain:cross() end -- cgit v1.3.1