Skip to content

Commit e27c862

Browse files
authored
Merge pull request swiftlang#35279 from apple/clarify-use-sccache-env-var
Clarify SWIFT_USE_SCCACHE meaning
2 parents c5e7a36 + 94f2c0d commit e27c862

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/DevelopmentTips.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ Compilation times for the compiler and the standard library can be agonizing, es
3232

3333
```
3434
$ brew install sccache
35-
$ sccache --start-server
3635
$ ./swift/utils/build-script MY_ARGS --sccache
3736
```
3837

39-
If you want to always use sccache, you can `export SWIFT_USE_SCCACHE=1` and the build script will pick it up.
38+
If you want to always use sccache, you can `export SWIFT_USE_SCCACHE=1` and omit the `--sccache` flag from the `build-script` invocation.
4039

41-
Given the size of artifacts generated, you might also want to bump the cache size from the default 10GB to something larger, say by putting `export SCCACHE_CACHE_SIZE="50G"` in your dotfile(s).
40+
Given the size of artifacts generated, you might also want to bump the cache size from the default 10GB to something larger, say by putting `export SCCACHE_CACHE_SIZE="50G"` in your dotfile(s). You'll need to restart the `sccache` server after changing that environment variable
41+
(`sccache --stop-server && sccache --start-server`).
4242

4343
You can run some compiles to see if it is actually doing something by running `sccache --show-stats`. Depending on the exact compilation task you're running, you might see very different cache hit rates. For example, `sccache` is particularly effective if you're rebuilding LLVM, which doesn't change so frequently from the Swift compiler's perspective. On the other hand, if you're changing the compiler's AST, the cache hit rate is likely to be much lower.
4444

0 commit comments

Comments
 (0)