Skip to content

Commit d7cca36

Browse files
Merge pull request #341 from cltnschlosser/cs_testingWithToolchains
Add section to README about testing with toolchains
2 parents fc167b0 + 7960303 commit d7cca36

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ apple/swift-driver#208
102102
```
103103
@swift-ci cross-repository testing facilities are described [here](https://github.com/apple/swift/blob/main/docs/ContinuousIntegration.md#cross-repository-testing).
104104

105+
### Testing in Xcode with custom toolchain
106+
After the toolchain is installed, Xcode needs to be told to use it. This can mean two things, building the driver with the toolchain and telling the driver to use the toolchain when running.
107+
108+
Building with the toolchain is easy, set the toolchain in Xcode: Menu Bar > Xcode > Toolchains > select your toolchain
109+
110+
Running the driver requires setting the TOOLCHAINS environment variable. This tells xcrun which toolchain to use (on darwin xcrun is used to find tools). This variable is the name of the toolchain and not the path (ex: `Swift Development Snapshot`). Important note: xcrun lookup is lower priority than the SWIFT_EXEC_*_EXEC family of environment variables, the tools directory, and any tools in the same directory as the driver (This includes a driver installed in a toolchain). Even though TOOLCHAINS is not highest priority it's a convenient way to run the xctest suite using a custom toolchain.
111+
105112
#### Preparing a Linux docker for debug
106113

107114
When developing on macOS without quick access to a Linux machine, using a Linux Docker is often helpful when debugging.

0 commit comments

Comments
 (0)