# zig cc: do not enable the cache for link operations · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/fda6d44778f3faf53c66945a0db65be68113416f)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: fda6d44778f3faf53c66945a0db65be68113416f

Requested commit: fda6d44778f3faf53c66945a0db65be68113416f

Commit: fda6d44778f3faf53c66945a0db65be68113416f

Tree: 56d5a1888b773308399ecfd54dd345f9673af26e

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
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

```

## Parents

- [c25ce5bba0d00283ad4de9077dba5a8d5255b619](https://git.cafe/gitcafe/zig/commit/c25ce5bba0d00283ad4de9077dba5a8d5255b619?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/fda6d44778f3faf53c66945a0db65be68113416f?format=markdown)
