mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NFC] GettingStarted: Minor corrections & clarifications for Ninja with Xcode
This commit is contained in:
@@ -365,7 +365,7 @@ following steps assume that you have already [built the toolchain with Ninja](#t
|
|||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
> A seamless LLDB debugging experience requires that your `build-script`
|
> A seamless LLDB debugging experience requires that your `build-script`
|
||||||
invocation for Ninja is tuned to produce build rules for the
|
invocation for Ninja is tuned to generate build rules for the
|
||||||
[debug variant](#debugging-issues) of the component you intend to debug.
|
[debug variant](#debugging-issues) of the component you intend to debug.
|
||||||
|
|
||||||
* <p id="generate-xcode">
|
* <p id="generate-xcode">
|
||||||
@@ -378,21 +378,26 @@ following steps assume that you have already [built the toolchain with Ninja](#t
|
|||||||
This can take a few minutes due to metaprogrammed sources that depend on LLVM
|
This can take a few minutes due to metaprogrammed sources that depend on LLVM
|
||||||
tools that are built from source.
|
tools that are built from source.
|
||||||
</p>
|
</p>
|
||||||
* Create an empty Xcode workspace.
|
* Create an empty Xcode workspace and open it.
|
||||||
* Add `build/Xcode-*/swift-macosx-*/Swift.xcodeproj` to the workspace. If Xcode
|
* Add `build/Xcode-*/swift-macosx-*/Swift.xcodeproj` to the workspace by
|
||||||
prompts to autocreate schemes, select *Manually Manage Schemes* and don't
|
selecting the Project navigator and choosing
|
||||||
create any schemes just yet.
|
*File > Add Files to "\<workspace name>"*.
|
||||||
|
|
||||||
This project includes the sources for almost everything in the repository,
|
> **Important**\
|
||||||
including the compiler, standard library and runtime. If you intend to work on
|
> If upon addition Xcode prompts to autocreate schemes, select *Manually
|
||||||
a compiler subcomponent that is written in Swift and has a `Package.swift`
|
Manage Schemes*.
|
||||||
file (e.g. `lib/ASTGen`), first choose *Product > Scheme > Manage Schemes...*
|
|
||||||
and select the *Autocreate schemes* checkbox, then add the package directory
|
This Xcode project includes the sources for almost everything in the
|
||||||
to the workspace by choosing *File > Add Files to "\<workspace name>"*. Xcode
|
repository, including the compiler, standard library and runtime.
|
||||||
will automatically create schemes for package manifest.
|
If you intend to work on a compiler subcomponent that is written in Swift and
|
||||||
|
has a `Package.swift` file, e.g. `lib/ASTGen`, first choose
|
||||||
|
*Product > Scheme > Manage Schemes* and select the *Autocreate schemes*
|
||||||
|
checkbox, then add the package directory to the workspace the same way you
|
||||||
|
added the Xcode project.
|
||||||
|
Xcode will automatically create schemes for the package manifest.
|
||||||
* Create an Xcode project using the _External Build System_ template, and add
|
* Create an Xcode project using the _External Build System_ template, and add
|
||||||
it to the workspace.
|
it to the workspace.
|
||||||
* Create a target in the new project, using the _External Build System_
|
* Create a target in the new Xcode project, using the _External Build System_
|
||||||
template.
|
template.
|
||||||
* In the _Info_ pane of the target settings, set
|
* In the _Info_ pane of the target settings, set
|
||||||
* _Build Tool_ to the absolute path of the `ninja` executable (the output of
|
* _Build Tool_ to the absolute path of the `ninja` executable (the output of
|
||||||
|
|||||||
Reference in New Issue
Block a user