Skip to content

Commit

Permalink
zig: enable ldc2-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Jan 15, 2024
1 parent 042ace2 commit c557840
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,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");

Expand Down

0 comments on commit c557840

Please sign in to comment.