Skip to content

Commit cb988a4

Browse files
committed
[docs] GettingStarted: Restructure "The actual build" section
1 parent bed316f commit cb988a4

File tree

1 file changed

+24
-35
lines changed

1 file changed

+24
-35
lines changed

docs/HowToGuides/GettingStarted.md

+24-35
Original file line numberDiff line numberDiff line change
@@ -253,42 +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-
--bootstrapping=hosttools
264-
```
265-
- Linux:
266-
```sh
267-
utils/build-script --release-debuginfo
268-
```
269-
If you installed and want to use Sccache, include the `--sccache` option in
270-
the invocation as well.
271-
<!-- FIXME: Without this "hard" line break, the note doesn’t get properly spaced from the bullet -->
272-
<br />
273-
274-
> **Note**
275-
> If you are planning to work on the compiler on macOS, but not the parts that are
276-
> written in Swift, pass `--bootstrapping=hosttools` to speed up local
277-
> development.
256+
Build the toolchain with optimizations, debuginfo, and assertions, using Ninja:
278257
279-
This will create a directory `swift-project/build/Ninja-RelWithDebInfoAssert`
280-
containing the Swift compiler and standard library and clang/LLVM build artifacts.
281-
If the build fails, see [Troubleshooting build issues](#troubleshooting-build-issues).
282-
283-
> **Note**
284-
> `--release-debuginfo` means that although debug information will be produced, all targets will
285-
> be compiled in release mode, meaning optimized code, which can affect your debugging experience.
286-
> Consider [`--debug-swift` to build a debug variant of the compiler](#debugging-issues) and have
287-
> the swift targets (including `swift-frontend`) built in debug mode.
288-
289-
On Linux, if you would like to additionally build the Swift corelibs,
290-
ie swift-corelibs-libdispatch, swift-corelibs-foundation, and swift-corelibs-xctest,
291-
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).
292281
293282
In the following sections, for simplicity, we will assume that you are using a
294283
`Ninja-RelWithDebInfoAssert` build on macOS, unless explicitly mentioned otherwise.

0 commit comments

Comments
 (0)