Skip to content

Commit 3cfb3b8

Browse files
committed
GettingStarted.md: Don’t suggest starting Sccache manually: build-script does it for you
1 parent cef0158 commit 3cfb3b8

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

Diff for: docs/HowToGuides/GettingStarted.md

+16-15
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ Double-check that running `pwd` prints a path ending with `swift`.
145145
[Xcode]: https://developer.apple.com/xcode/resources/
146146
[CMake]: https://cmake.org
147147
[Ninja]: https://ninja-build.org
148-
[Sccache]: https://github.com/mozilla/sccache
149148
[Homebrew]: https://brew.sh/
150149
[Homebrew Bundle]: https://github.com/Homebrew/homebrew-bundle
151150
@@ -157,7 +156,7 @@ Double-check that running `pwd` prints a path ending with `swift`.
157156
* [CentOS 7](https://github.com/apple/swift-docker/blob/main/swift-ci/master/centos/7/Dockerfile)
158157
* [Amazon Linux 2](https://github.com/apple/swift-docker/blob/main/swift-ci/master/amazon-linux/2/Dockerfile)
159158
160-
2. To install `sccache` (optional):
159+
2. To install [Sccache][] (optional):
161160
* If you're not building within a Docker container:
162161
```
163162
sudo snap install sccache --candidate --classic
@@ -176,14 +175,17 @@ Double-check that running `pwd` prints a path ending with `swift`.
176175
**Note:** LLDB currently requires at least `swig-1.3.40` but will
177176
successfully build with version 2 shipped with Ubuntu.
178177
178+
[Sccache]: https://github.com/mozilla/sccache
179+
179180
## Building the project for the first time
180181
181182
### Spot check dependencies
182183
183-
* Run `cmake --version`: This should be 3.19.6 or higher.
184-
* Run `python3 --version`: Check that this succeeds.
185-
* Run `ninja --version`: Check that this succeeds.
186-
* Run `sccache --version`: Check that this succeeds.
184+
* Run `cmake --version`; this should be 3.19.6 or higher.
185+
* Run `python3 --version`; check that this succeeds.
186+
* Run `ninja --version`; check that this succeeds.
187+
* If you installed and want to use Sccache: Run `sccache --version`; check
188+
that this succeeds.
187189
188190
### The roles of different tools
189191
@@ -206,6 +208,11 @@ to understand what the different tools do:
206208
(i.e. do a "clean build"), Sccache can accelerate the new build
207209
significantly. There are few things more satisfying than seeing Sccache
208210
cut through build times.
211+
212+
> **Note**
213+
> Sccache defaults to a cache size of 10GB, which is relatively small
214+
> compared to build artifacts. You can bump it up, say, by setting
215+
> `export SCCACHE_CACHE_SIZE="50G"` in your dotfile(s).
209216
5. `utils/update-checkout` is a script to help you work with all the individual
210217
git repositories together, instead of manually cloning/updating each one.
211218
6. `utils/build-script` (we will introduce this shortly)
@@ -222,15 +229,7 @@ Phew, that's a lot to digest! Now let's proceed to the actual build itself!
222229
223230
### The actual build
224231
225-
1. Make sure you have Sccache running.
226-
```sh
227-
sccache --start-server
228-
```
229-
(Optional) Sccache defaults to a cache size of 10GB, which is relatively
230-
small compared to build artifacts. You can bump it up, say by setting
231-
`export SCCACHE_CACHE_SIZE="50G"` in your dotfile(s). For more details,
232-
see the [Sccache README][Sccache].
233-
2. Build the toolchain with optimizations, debuginfo, and assertions, using
232+
1. Build the toolchain with optimizations, debuginfo, and assertions, using
234233
Ninja.
235234
- macOS:
236235
```sh
@@ -247,6 +246,8 @@ Phew, that's a lot to digest! Now let's proceed to the actual build itself!
247246
utils/build-script --release-debuginfo --skip-early-swift-driver \
248247
--skip-early-swiftsyntax
249248
```
249+
If you installed and want to use Sccache, include the `--sccache` option in
250+
the invocation as well.
250251
251252
> **Note**
252253
> If you aren't planning to edit the parts of the compiler that are written

0 commit comments

Comments
 (0)