@@ -253,41 +253,31 @@ Phew, that's a lot to digest! Now let's proceed to the actual build itself!
253253
254254### The actual build
255255
256- 1. Build the toolchain with optimizations, debuginfo, and assertions, using
257- Ninja.
258- - macOS:
259- ```sh
260- utils/build-script --skip-build-benchmarks \
261- --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" \
262- --sccache --release-debuginfo --swift-disable-dead-stripping
263- ```
264- - Linux:
265- ```sh
266- utils/build-script --release-debuginfo
267- ```
268- If you installed and want to use Sccache, include the `--sccache` option in
269- the invocation as well.
270- <!-- FIXME: Without this "hard" line break, the note doesn’t get properly spaced from the bullet -->
271- <br />
272-
273- > **Note**
274- > If you are planning to work on the compiler on macOS, but not the parts that are
275- > written in Swift, pass `--bootstrapping=hosttools` to speed up local
276- > development.
256+ Build the toolchain with optimizations, debuginfo, and assertions, using Ninja:
277257
278- This will create a directory `swift-project/build/Ninja-RelWithDebInfoAssert`
279- containing the Swift compiler and standard library and clang/LLVM build artifacts.
280- If the build fails, see [Troubleshooting build issues](#troubleshooting-build-issues).
281-
282- > **Note**
283- > `--release-debuginfo` means that although debug information will be produced, all targets will
284- > be compiled in release mode, meaning optimized code, which can affect your debugging experience.
285- > Consider [`--debug-swift` to build a debug variant of the compiler](#debugging-issues) and have
286- > the swift targets (including `swift-frontend`) built in debug mode.
287-
288- On Linux, if you would like to additionally build the Swift corelibs,
289- ie swift-corelibs-libdispatch, swift-corelibs-foundation, and swift-corelibs-xctest,
290- add the `--xctest` flag to `build-script`.
258+ - macOS:
259+ ```sh
260+ utils/build-script --skip-build-benchmarks \
261+ --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" \
262+ --sccache --release-debuginfo --swift-disable-dead-stripping \
263+ --bootstrapping=hosttools
264+ ```
265+ - Linux:
266+ ```sh
267+ utils/build-script --release-debuginfo
268+ ```
269+ - If you want to additionally build the Swift core libraries, i.e.,
270+ swift-corelibs-libdispatch, swift-corelibs-foundation, and
271+ swift-corelibs-xctest, add `--xctest` to the invocation.
272+
273+ - If you installed and want to use Sccache, add `--sccache` to the invocation.
274+ - If you want to use a debugger such as LLDB on compiler sources, add
275+ `--debug-swift` to the invocation: a fruitful debugging experience warrants
276+ non-optimized code besides debug information.
277+
278+ This will create a directory `swift-project/build/Ninja-RelWithDebInfoAssert`
279+ containing the Swift compiler and standard library and clang/LLVM build artifacts.
280+ If the build fails, see [Troubleshooting build issues](#troubleshooting-build-issues).
291281
292282In the following sections, for simplicity, we will assume that you are using a
293283`Ninja-RelWithDebInfoAssert` build on macOS, unless explicitly mentioned otherwise.
0 commit comments