# stage2: disable lld caching when output dir is owned by user · gitcafe/zig

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

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

Visibility: public

Requested revision: 70d7d7e919d7f297e63ca421f6be5925259136e2

Requested commit: 70d7d7e919d7f297e63ca421f6be5925259136e2

Commit: 70d7d7e919d7f297e63ca421f6be5925259136e2

Tree: 1635b864f21a78a8d273fa9a946191a8b9796e8b

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: disable lld caching when output dir is owned by user

Normally when using LLD to link, Zig uses a file named "lld.id" in the
same directory as the output binary which contains the hash of the link
operation, allowing Zig to skip linking when the hash would be unchanged.
In the case that the output binary is being emitted into a directory which
is externally modified - essentially anything other than zig-cache - then
this flag would be set to disable this machinery to avoid false positives.

 * Better defaults when using -fno-LLVM
 * Fix compiler_rt and libc static libraries were getting a .zig
   extension instead of .a extension.
 * when using the stage1 backend, put the object file next to the
   stage1.id file in the cache directory. this prevents an object file
   from polluting the cwd when using zig from the CLI.

```

## Parents

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

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