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 03d3b67 commit 7cf3e5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 7cf3e5a

Please sign in to comment.