# \`@cImport\` works with \`\-\-cache on\` · gitcafe/zig

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

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

Visibility: public

Requested revision: 0d4db8828a9efc05b5c3622098a8337de0b62d1e

Requested commit: 0d4db8828a9efc05b5c3622098a8337de0b62d1e

Commit: 0d4db8828a9efc05b5c3622098a8337de0b62d1e

Tree: f87768be86d630511e694ebd09173057c7b88a58

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
`@cImport` works with `--cache on`

We pass -MD -MF args to clang when doing `@cImport`, which
gives us a complete list of files that the C code read from.
Then we add these to the cache. So even when using `@cImport`
Zig's caching system remains perfect. This is a proof of concept
for the mechanism that the self-hosted compiler will use to
watch and rebuild files.

```

## Parents

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

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