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
+77-3Lines changed: 77 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ toolchain as a one-off, there are a couple of differences:
25
25
-[Editing code](#editing-code)
26
26
-[Setting up your fork](#setting-up-your-fork)
27
27
-[First time Xcode setup](#first-time-xcode-setup)
28
+
-[Using Ninja with Xcode](#using-ninja-with-xcode)
28
29
-[Other IDEs setup](#other-ides-setup)
29
30
-[Editing](#editing)
30
31
-[Incremental builds with Ninja](#incremental-builds-with-ninja)
@@ -285,9 +286,6 @@ The additional flexibility comes with two issues: (1) consuming much more disk
285
286
space and (2) you need to maintain the two builds in sync, which needs extra
286
287
care when moving across branches.
287
288
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
289
### Troubleshooting build issues
292
290
293
291
- Double-check that all projects are checked out at the right branches.
@@ -368,6 +366,82 @@ select the following schemes:
368
366
run.
369
367
<!-- TODO: Insert SourceKit/stdlib specific instructions? -->
370
368
369
+
### Using Ninja with Xcode
370
+
371
+
Although it's possible to build the toolchain entirely with Xcode via `--xcode`,
372
+
a more efficient and robust option is to integrate a Ninja build with Xcode.
373
+
This is also convenient in that you can navigate, build, run, edit, and debug in
374
+
Xcode while retaining the option of using Ninja on the command line.
375
+
376
+
Assuming that you have already [built the toolchain via Ninja](#the-actual-build),
377
+
several more steps are necessary to set up this environment:
378
+
* Generate Xcode projects with `utils/build-script --skip-build --xcode --skip-early-swift-driver`.
379
+
This will first build a few LLVM files that are needed to configure the
380
+
projects.
381
+
* Create a new Xcode workspace.
382
+
* Add the generated Xcode projects or Swift packages that are relevant to your
383
+
tasks to your workspace. All the Xcode projects can be found among the
384
+
build artifacts in`build/Xcode-DebugAssert`. For example:
385
+
* If you are aiming for the compiler, add `build/Xcode-DebugAssert/swift-macosx-*/Swift.xcodeproj`.
386
+
This project also includes the standard library and runtime sources. If you
387
+
need the parts of the compiler that are implemented in Swift itself, add the
388
+
`swift/SwiftCompilerSources/Package.swift` package as well.
389
+
* If you are aiming for just the standard library or runtime, add
0 commit comments