diff options
| author | ruki <[email protected]> | 2020-12-08 00:29:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-08 00:29:44 +0800 |
| commit | dc224a6dbb7a8f4fd0ecf41b5dd4d3c3ec7c465d (patch) | |
| tree | 106dbbe5e057c95ad6ab8d013aa361ef9c490fa5 /xmake/rules/zig/xmake.lua | |
| parent | 1858fb1601354b7444ca79f01a54b2d505ccf98c (diff) | |
modify zig-cache directory
Diffstat (limited to 'xmake/rules/zig/xmake.lua')
| -rw-r--r-- | xmake/rules/zig/xmake.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/rules/zig/xmake.lua b/xmake/rules/zig/xmake.lua index 43d25f55c..0f1d6848d 100644 --- a/xmake/rules/zig/xmake.lua +++ b/xmake/rules/zig/xmake.lua @@ -21,6 +21,11 @@ -- define rule: zig.build rule("zig.build") set_sourcekinds("zc") + on_load(function (target) + local cachedir = target:values("zig.cachedir") or path.join(target:objectdir(), "zig-cache") + os.mkdir(cachedir) + target:add("zcflags", "--cache-dir " .. cachedir) + end) on_build_files("private.action.build.object", {batch = true}) -- define rule: zig |
