Skip to content

Commit

Permalink
allow using zig cc to compile assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
wenxuanjun authored Nov 4, 2024
1 parent 6809dd1 commit 4392754
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xmake/toolchains/zig/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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++")
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4392754

Please sign in to comment.