# store stage1 flags in a trailing byte in the hash id symlink · gitcafe/zig

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

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

Visibility: public

Requested revision: 412a2f966e18aa792089ac1f41482222d7f2434f

Requested commit: 412a2f966e18aa792089ac1f41482222d7f2434f

Commit: 412a2f966e18aa792089ac1f41482222d7f2434f

Tree: 36f4d7f00ce93bc3f10844e3bbf56f75c8ddba8d

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
store stage1 flags in a trailing byte in the hash id symlink

When we get a cache hit for a stage1 compilation, we need to know about
some of the flags such as have_winmain or have_dllmain to know which
subsystem to infer during linking.

To do this, we append a hex-encoded byte into the intentionally-dangling
symlink which contains the cache hash digest rather than a filename. The
hex-encoded byte contains the flags we need to infer the subsystem
during linking.

```

## Parents

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

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