You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/HowToGuides/GettingStarted.md
+76-3Lines changed: 76 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -285,9 +285,6 @@ The additional flexibility comes with two issues: (1) consuming much more disk
285
285
space and (2) you need to maintain the two builds in sync, which needs extra
286
286
care when moving across branches.
287
287
288
-
### Integrate a Ninja build with Xcode
289
-
It is possible to integrate the Ninja build into Xcode. For details on how to set this up see [Using Ninja with Xcode in DevelopmentTips.md](/docs/DevelopmentTips.md#using-ninja-with-xcode).
290
-
291
288
### Troubleshooting build issues
292
289
293
290
- Double-check that all projects are checked out at the right branches.
@@ -368,6 +365,82 @@ select the following schemes:
368
365
run.
369
366
<!-- TODO: Insert SourceKit/stdlib specific instructions? -->
370
367
368
+
### Using Ninja with Xcode
369
+
370
+
Although it's possible to build the toolchain entirely with Xcode via `--xcode`,
371
+
a more efficient and robust option is to integrate a Ninja build with Xcode.
372
+
This is also convenient in that you can navigate, build, run, edit and debug in
373
+
Xcode while retaining the option of using Ninja on the command line.
374
+
375
+
Assuming that you have already [built the toolchain via Ninja](#the-actual-build),
376
+
several more steps are necessary to set up this environment:
377
+
* Generate Xcode projects with `utils/build-script --skip-build --xcode --skip-early-swift-driver`.
378
+
This will first build a few LLVM files that are needed to configure the
379
+
projects.
380
+
* Create a new Xcode workspace.
381
+
* Add the generated Xcode projects or Swift packages that are relevant to your
382
+
tasks to your workspace. All the Xcode projects can be found among the
383
+
build artifacts in`build/Xcode-DebugAssert`. For example:
384
+
* If you are aiming for the compiler, add `build/Xcode-DebugAssert/swift-macosx-*/Swift.xcodeproj`.
385
+
This project also includes the standard library and runtime sources. If you
386
+
need the parts of the compiler that are implemented in Swift itself, add the
387
+
`swift/SwiftCompilerSources/Package.swift` package as well.
388
+
* If you are aiming for just the standard library or runtime, add
0 commit comments