From 7cf3e5a8f83b51d4172e918d1b3fad33c94aacef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Catarino=20Fran=C3=A7a?= Date: Mon, 15 Jan 2024 09:50:58 -0300 Subject: [PATCH] zig: enable ldc2-cache --- build.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index 9aa5bb8..b2c893c 100644 --- a/build.zig +++ b/build.zig @@ -375,8 +375,10 @@ fn DCompileStep(b: *Build, lib_sokol: *CompileStep, options: LDCOptions) !*RunSt try cmds.append("--vcolumns"); // object file output (zig-cache/o/{hash_id}/*.o) - if (b.cache_root.path) |path| + if (b.cache_root.path) |path| { try cmds.append(b.fmt("-od={s}", .{b.pathJoin(&.{ path, "o", b.cache.hash.peek()[0..] })})); + try cmds.append(b.fmt("-cache={s}", .{b.pathJoin(&.{ path, "o", b.cache.hash.peek()[0..] })})); + } // name object files uniquely (so the files don't collide) try cmds.append("--oq");