@@ -145,7 +145,6 @@ Double-check that running `pwd` prints a path ending with `swift`.
145
145
[Xcode]: https://developer.apple.com/xcode/resources/
146
146
[CMake]: https://cmake.org
147
147
[Ninja]: https://ninja-build.org
148
- [Sccache]: https://github.com/mozilla/sccache
149
148
[Homebrew]: https://brew.sh/
150
149
[Homebrew Bundle]: https://github.com/Homebrew/homebrew-bundle
151
150
@@ -157,7 +156,7 @@ Double-check that running `pwd` prints a path ending with `swift`.
157
156
* [CentOS 7](https://github.com/apple/swift-docker/blob/main/swift-ci/master/centos/7/Dockerfile)
158
157
* [Amazon Linux 2](https://github.com/apple/swift-docker/blob/main/swift-ci/master/amazon-linux/2/Dockerfile)
159
158
160
- 2. To install `sccache` (optional):
159
+ 2. To install [Sccache][] (optional):
161
160
* If you' re not building within a Docker container:
162
161
```
163
162
sudo snap install sccache --candidate --classic
@@ -176,14 +175,17 @@ Double-check that running `pwd` prints a path ending with `swift`.
176
175
**Note:** LLDB currently requires at least `swig-1.3.40` but will
177
176
successfully build with version 2 shipped with Ubuntu.
178
177
178
+ [Sccache]: https://github.com/mozilla/sccache
179
+
179
180
## Building the project for the first time
180
181
181
182
### Spot check dependencies
182
183
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.
187
189
188
190
### The roles of different tools
189
191
@@ -206,6 +208,11 @@ to understand what the different tools do:
206
208
(i.e. do a "clean build"), Sccache can accelerate the new build
207
209
significantly. There are few things more satisfying than seeing Sccache
208
210
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).
209
216
5. `utils/update-checkout` is a script to help you work with all the individual
210
217
git repositories together, instead of manually cloning/updating each one.
211
218
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!
222
229
223
230
### The actual build
224
231
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
234
233
Ninja.
235
234
- macOS:
236
235
```sh
@@ -247,6 +246,8 @@ Phew, that's a lot to digest! Now let's proceed to the actual build itself!
247
246
utils/build-script --release-debuginfo --skip-early-swift-driver \
248
247
--skip-early-swiftsyntax
249
248
```
249
+ If you installed and want to use Sccache, include the `--sccache` option in
250
+ the invocation as well.
250
251
251
252
> **Note**
252
253
> If you aren't planning to edit the parts of the compiler that are written
0 commit comments