# link: make sure MachO closes the damn files · gitcafe/zig

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

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

Visibility: public

Requested revision: 725c82582935d2bb84d52d906edb2975827b01ec

Requested commit: 725c82582935d2bb84d52d906edb2975827b01ec

Commit: 725c82582935d2bb84d52d906edb2975827b01ec

Tree: 4a46d9a3f26ec99e4da17e61eeec7c5b5a601fb3

Author: mlugg

Committer: Jacob Young

## Message

```
link: make sure MachO closes the damn files

Windows is a ridiculous operating system designed by toddlers, and so
requires us to close all file handles in the `tmp/xxxxxxx` cache dir
before renaming it into `o/xxxxxxx`. We have a hack in place to handle
this for the main output file, but the MachO linker also outputs a file
with debug symbols, and we weren't closing it! This led to a fuckton of
CI failures when we enabled `.whole` cache mode by default for
self-hosted backends.

thanks jacob for figuring this out while i sat there

```

## Parents

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

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