# link: consolidate diagnostics · gitcafe/zig

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

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

Visibility: public

Requested revision: 13fb68c064900cee67583e603d8c2acf41770663

Requested commit: 13fb68c064900cee67583e603d8c2acf41770663

Commit: 13fb68c064900cee67583e603d8c2acf41770663

Tree: 537e524b28610d80f2553d1b124f67b4656fb80a

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
link: consolidate diagnostics

By organizing linker diagnostics into this struct, it becomes possible
to share more code between linker backends, and more importantly it
becomes possible to pass only the Diag struct to some functions, rather
than passing the entire linker state object in. This makes data
dependencies more obvious, making it easier to rearrange code and to
multithread.

Also fix MachO code abusing an atomic variable. Not only was it using
the wrong atomic operation, it is unnecessary additional state since
the state is already being protected by a mutex.

```

## Parents

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

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