Skip to content

Latest commit

 

History

History
51 lines (31 loc) · 1.64 KB

GettingStarted.md

File metadata and controls

51 lines (31 loc) · 1.64 KB

Getting Started

On OS X

Although OS X is not a deployment platform for Swift Foundation, it is useful for development and test purposes.

In order to build on OS X, you will need:

  • The latest version of Xcode
  • The latest version of the OS X SDK (at this time: 10.11)

Build steps:

  1. Open Foundation.xcodeproj
  2. Build the Foundation target

Testing steps:

  1. Create a new Xcode workspace that includes both Foundation.xcodeproj and XCTest.xcodeproj (from the swift-corelibs-xctest repository). The Swift Core Libraries XCTest project is not the same as the one that comes with Xcode itself.
  2. Run (Cmd-R) the TestFoundation target

On Linux

You will need:

To get started, follow the instructions on how to build Swift. Foundation requires use of the version of swiftc and clang built with the overall project.

The default build script does not include Foundation. To build Foundation as well, pass --foundation to the build script.

swift/utils/build-script --foundation -t

This will build and run the Foundation tests.

After the complete Swift build has finished, you can iterate quickly on Foundation itself by simply invoking ninja in the Foundation directory.

cd Foundation
ninja

This will build Foundation. To build and run the tests, use the test target:

ninja test

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.