# stage2: CacheMode.whole fixes · gitcafe/zig

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

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

Visibility: public

Requested revision: 67e31807df73ad2da992293fcdf1f6ea7ca67d2a

Requested commit: 67e31807df73ad2da992293fcdf1f6ea7ca67d2a

Commit: 67e31807df73ad2da992293fcdf1f6ea7ca67d2a

Tree: 89182e7bc11d3b661ba3697faa5f21e96ae050c6

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: CacheMode.whole fixes

 * Logic to check whether a bin file is not emitted is more complicated
   in between `Compilation.create` and `Compilation.update`. Fixed the
   logic that decides whether to build compiler-rt and other support
   artifacts.
 * Basically, one cannot inspect the value of `comp.bin_file.emit` until
   after update() is called - fixed another instance of this happening
   in the CLI.
 * In the CLI, `runOrTest` is updated to properly use the result value
   of `comp.bin_file.options.emit` rather than guessing whether the
   output binary is.
 * Don't assume that the emit output has no directory components in
   sub_path. In other words, don't assume that the emit directory is the
   final directory; there may be sub-directories.

```

## Parents

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

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