Skip to content

Commit 8bc60ab

Browse files
authored
Merge pull request #59019 from eeckstein/doc-fixes
docs: a few minor fixes/improvements in DevelopmentTips.md
2 parents c48be90 + 9335249 commit 8bc60ab

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

docs/DevelopmentTips.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,21 @@ This is very convenient because you get the benefits of the ninja build system a
9292

9393
To setup this environment a few steps are necessary:
9494
* Create a new workspace.
95-
* Create Xcode projects for LLVM and Swift with `utils/build-script --skip-build --xcode --skip-early-swift-driver`. Beside configuring, this needs to build a few LLVM files which are need to configure the swift project.
95+
* Create Xcode projects for LLVM and Swift with `utils/build-script --skip-build --xcode --skip-early-swift-driver`. Beside configuring, this needs to build a few LLVM files which are needed to configure the swift project.
9696
* Add the generated LLVM and Swift projects to your workspace. They can be found in the build directories `build/Xcode-DebugAssert/llvm-macosx-x86_64/LLVM.xcodeproj` and `build/Xcode-DebugAssert/swift-macosx-x86_64/Swift.xcodeproj`.
9797
* Add the `swift/SwiftCompilerSources` package to the workspace.
9898
* Create a new empty project `build-targets` (or however you want to name it) in the workspace, using the "External Build System" template.
9999
* For each compiler tool you want to build (`swift-frontend`, `sil-opt`, etc.), add an "External Build System" target to the `build-targets` project.
100-
* In the "Info" section of the target configuration, set
101-
* the _Build Tool_ to the full path of the `ninja` command
102-
* the _Argument_ to the tool name (e.g. `swift-frontend`)
103-
* the _Directory_ to the ninja swift build directory, e.g. `/absolute/path/to/build/Ninja-DebugAssert/swift-macosx-x86_64`. For debugging to work, this has to be a debug build of course.
100+
* In the "Info" section of the target configuration, set:
101+
* the _Build Tool_ to the full path of the `ninja` command
102+
* the _Argument_ to the tool name (e.g. `swift-frontend`)
103+
* the _Directory_ to the ninja swift build directory, e.g. `/absolute/path/to/build/Ninja-DebugAssert/swift-macosx-x86_64`. For debugging to work, this has to be a debug build of course.
104104
* For each target, create a new scheme:
105-
* In the _Build_ section add the corresponding build target what you created before.
105+
* In the _Build_ section add the corresponding build target that you created before.
106106
* In the _Run/Info_ section select the built _Executable_ in the build directory (e.g. `/absolute/path/to/build/Ninja-DebugAssert/swift-macosx-x86_64/bin/swift-frontend`).
107107
* In the _Run/Arguments_ section you can set the command line arguments with which you want to run the compiler tool.
108108
* In the _Run/Options_ section you can set the working directory for debugging.
109109

110-
Now you are all set. You can build and debug like with a native Xcode project.
110+
Now you are all set. You can build and debug like with a native Xcode project.
111+
112+
If the project structure changes, e.g. new source files are added or deleted, you just have to re-create the LLVM and Swift projects with `utils/build-script --skip-build --xcode --skip-early-swift-driver`.

docs/HowToGuides/GettingStarted.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ The additional flexibility comes with two issues: (1) consuming much more disk
282282
space and (2) you need to maintain the two builds in sync, which needs extra
283283
care when moving across branches.
284284

285+
It is even 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).
286+
285287
### Troubleshooting build issues
286288

287289
- Double-check that all projects are checked out at the right branches.

0 commit comments

Comments
 (0)