| author | |
| committer | |
| log | fda6d44778f3faf53c66945a0db65be68113416f |
| tree | 56d5a1888b773308399ecfd54dd345f9673af26e |
| parent | c25ce5bba0d00283ad4de9077dba5a8d5255b619 |
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 #123171 files changed, 0 insertions(+), 1 deletions(-)
src/main.zig-1| ... | ... | @@ -2110,7 +2110,6 @@ fn buildOutputType( |
| 2110 | 2110 | .link => { |
| 2111 | 2111 | output_mode = if (is_shared_lib) .Lib else .Exe; |
| 2112 | 2112 | emit_bin = if (out_path) |p| .{ .yes = p } else EmitBin.yes_a_out; |
| 2113 | enable_cache = true; | |
| 2114 | 2113 | if (emit_llvm) { |
| 2115 | 2114 | fatal("-emit-llvm cannot be used when linking", .{}); |
| 2116 | 2115 | } |