mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
zig cc: do not enable the cache for link operations
This commit makes `zig cc` match the equivalent behavior of `zig build-exe` with regards to caching. That is - it will cache individual .c to .o compilations (with the usual exceptions), but will always repeat the linking process so that incremental linking has a chance to happen. Perhaps a future enhancement will provide a way to get the old behavior, but I suspect this new behavior will be preferred by everyone, because it is closer to what C compilers do. Note that the old behavior can be obtained by switching to `zig build-exe` instead of `zig cc` and using the `--enable-cache` parameter. Closes #12317
This commit is contained in:
parent
c25ce5bba0
commit
fda6d44778
@ -2110,7 +2110,6 @@ fn buildOutputType(
|
||||
.link => {
|
||||
output_mode = if (is_shared_lib) .Lib else .Exe;
|
||||
emit_bin = if (out_path) |p| .{ .yes = p } else EmitBin.yes_a_out;
|
||||
enable_cache = true;
|
||||
if (emit_llvm) {
|
||||
fatal("-emit-llvm cannot be used when linking", .{});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user