summaryrefslogtreecommitdiff
path: root/xmake/toolchains/zig/xmake.lua
diff options
context:
space:
mode:
authorXuanjun Wen <[email protected]>2024-11-04 19:36:58 +0800
committerGitHub <[email protected]>2024-11-04 19:36:58 +0800
commit4392754edda6b619e70a0b225598f3a25f8938c4 (patch)
tree06172a0b81ceda17674813eb3bca8d4f89148511 /xmake/toolchains/zig/xmake.lua
parent6809dd1fc95cd38686c9a67a3616519c7d226cfd (diff)
allow using zig cc to compile assembly
Diffstat (limited to 'xmake/toolchains/zig/xmake.lua')
-rw-r--r--xmake/toolchains/zig/xmake.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/xmake/toolchains/zig/xmake.lua b/xmake/toolchains/zig/xmake.lua
index fc24290b9..adff1be42 100644
--- a/xmake/toolchains/zig/xmake.lua
+++ b/xmake/toolchains/zig/xmake.lua
@@ -59,6 +59,7 @@ toolchain("zig")
if toolchain:config("zigcc") ~= false then
-- we can use `set_toolchains("zig", {zigcc = false})` to disable zigcc
-- @see https://github.com/xmake-io/xmake/issues/3251
+ toolchain:set("toolset", "as", zig .. " cc")
toolchain:set("toolset", "cc", zig .. " cc")
toolchain:set("toolset", "cxx", zig .. " c++")
toolchain:set("toolset", "ld", zig .. " c++")
@@ -119,6 +120,7 @@ toolchain("zig")
target = arch .. "-windows-gnu"
end
if target then
+ toolchain:add("zig_cc.asflags", "-target", target)
toolchain:add("zig_cc.cxflags", "-target", target)
toolchain:add("zig_cc.shflags", "-target", target)
toolchain:add("zig_cc.ldflags", "-target", target)