Skip to content

Commit 768c5ce

Browse files
committed
Resolve #7372
1 parent 6f71ecb commit 768c5ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

xmake/rules/zig/xmake.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
rule("zig.build")
2323
set_sourcekinds("zc")
2424
on_load(function (target)
25+
local toolchains = target:get("toolchains") or get_config("toolchain")
26+
if not toolchains or not table.contains(table.wrap(toolchains), "zig") then
27+
target:add("toolchains", "zig")
28+
end
2529
local cachedir = target:values("zig.cachedir") or path.join(target:objectdir(), "zig-cache")
2630
os.mkdir(cachedir)
2731
target:add("zcflags", "--cache-dir " .. cachedir)

0 commit comments

Comments
 (0)