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/GettingStarted.md
+33-7
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,28 @@
2
2
3
3
## On OS X
4
4
5
-
Although OS X is not a deployment platform for Swift Foundation, it is useful for development and test purposes. The repository includes an Xcode project file as well as an Xcode workspace. The workspace includes both Foundation and XCTest, which makes it easy to build and run everything together.
5
+
Although OS X is not a deployment platform for Swift Foundation, it is useful for development and test purposes.
6
6
7
7
In order to build on OS X, you will need:
8
8
9
9
* The latest version of Xcode
10
10
* The latest version of the OS X SDK (at this time: 10.11)
11
+
* The [current Swift toolchain](https://oss.apple.com/download/#latest-development-snapshots).
11
12
12
-
The Xcode workspace assumes that Foundation and XCTest are checked out from GitHub in peer directories, and with those exact names.
13
+
Foundation is developed at the same time as the rest of Swift, so the most recent version of the compiler is required in order to build it.
14
+
15
+
The repository includes an Xcode project file as well as an Xcode workspace. The workspace includes both Foundation and XCTest, which makes it easy to build and run everything together. The workspace assumes that Foundation and XCTest are checked out from GitHub in peer directories. For example:
16
+
17
+
```
18
+
% cd Development
19
+
% ls
20
+
swift-corelibs-foundation swift-corelibs-xctest
21
+
%
22
+
```
13
23
14
24
Build steps:
15
25
26
+
0. Run Xcode with the latest toolchain. Follow (the instructions here)[https://oss.apple.com/download/#apple-platforms] to start Xcode with the correct toolchain.
16
27
0. Open `Foundation.xcworkspace`.
17
28
0. Build the _Foundation_ target. This builds CoreFoundation and Foundation.
18
29
@@ -27,15 +38,15 @@ You will need:
27
38
28
39
* A supported distribution of Linux. At this time, we support [Ubuntu 14.04 and Ubuntu 15.10](http://www.ubuntu.com).
29
40
30
-
To get started, follow the instructions on how to [build Swift](https://github.com/apple/swift#building-swift). Foundation requires use of the version of `swiftc` and `clang` built with the overall project.
41
+
To get started, follow the instructions on how to [build Swift](https://github.com/apple/swift#building-swift). Foundation is developed at the same time as the rest of Swift, so the most recent version of the `clang` and `swift` compilers are required in order to build it.
31
42
32
-
The default build script does not include Foundation. To build Foundation as well, pass `--foundation` to the build script.
43
+
The default build script does not include Foundation. To build Foundation and XCTest as well, pass `--xctest --foundation` to the build script.
33
44
34
45
```
35
-
swift/utils/build-script --foundation -t
46
+
swift/utils/build-script --xctest --foundation -t
36
47
```
37
48
38
-
This will build and run the Foundation tests.
49
+
This will build and run the Foundation tests, in the Debug configuration.
39
50
40
51
After the complete Swift build has finished, you can iterate quickly on Foundation itself by simply invoking `ninja` in the Foundation directory.
41
52
@@ -50,4 +61,19 @@ This will build Foundation. To build and run the tests, use the `test` target:
50
61
ninja test
51
62
```
52
63
53
-
The script will also output some help on how to run the tests under the debugger. The exact library path to use will depend on how Foundation itself was configured.
64
+
The ninja build script will print the correct command-line invocation for both running the tests and debugging the tests. The exact library path to use will depend on how Foundation itself was configured by the earlier `build-script`. For example:
0 commit comments