- Notifications
You must be signed in to change notification settings - Fork124
A high-level build system based on llbuild, used by Xcode, Swift Playground, and the Swift Package Manager
License
swiftlang/swift-build
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Swift Build is a high-level build system based onllbuild with great support for building Swift. It is used by Xcode to build Xcode projects and Swift packages, and by Swift Playground. It can also be used as the Swift Package Manager build system in preview form when passing--build-system swiftbuild
.
When building SwiftPM from sources which include Swift Build integration, passing--build-system swiftbuild
will enable the new build-system. This functionality is not currently available in nightly toolchains.
Changes to swift-build can also be tested in Xcode using thelaunch-xcode
command plugin provided by the package. Runswift package --disable-sandbox launch-xcode
from your checkout of swift-build to launch a copy of the currentlyxcode-select
ed Xcode.app configured to use your modified copy of the build system service. This workflow is generally only supported when using the latest available Xcode version.
Changes to swift-build can also be tested in xcodebuild using therun-xcodebuild
command plugin provided by the package. Runswift package --disable-sandbox run-xcodebuild
from your checkout of swift-build to run xcodebuild from the currentlyxcode-select
ed Xcode.app configured to use your modified copy of the build system service. Arguments followed by--
will be forwarded to xcodebuild unmodified. This workflow is generally only supported when using the latest available Xcode version.
When using the Xcode or xcodebuild workflows above, you can easily set breakpoints and debug. First, open the swift-build package containing your changes in Xcode and choose the "Debug > Attach to Process by PID or Name…" menu item. In the panel that appears, type "SWBBuildServiceBundle" as the process name and click "Attach". The debugger will wait for the process to launch. Run the relevant command shown above to launch Xcode or xcodebuild, and once you open a workspace the swift-build process will launch and the debugger will attach to it automatically.
SwiftBuild.docc contains additional technical documentation.
To view the documentation in browser, run the following command at the root of the project:
docc preview SwiftBuild.docc
On macOS, use:
xcrun docc preview SwiftBuild.docc
Before submitting the pull request, please make sure you have tested your changes. You can run the full test suite by runningswift test
from the root of the repository. The test suite is organized into a number of different test targets, with each corresponding to a specific component. For example,SWBTaskConstructionTests
contains tests for theSWBTaskConstruction
module which plan builds and then inspect the resulting build graph. Many tests in Swift Build operate on test project model objects which emulate those constructed by a higher level client and validate behavior at different layers. You can learn more about how these tests are written and organized inProject Tests.
Contributions to Swift Build are welcomed and encouraged! Please see theContributing to Swift guide.
Before submitting the pull request, please make sure that they follow the Swift projectguidelines for contributingcode. Bug reports should befiled inthe issue tracker ofswift-build
repository on GitHub.
To be a truly great community,Swift.org needs to welcomedevelopers from all walks of life, with different backgrounds, and with a widerange of experience. A diverse and friendly community will have more greatideas, more unique perspectives, and produce more great code. We will workdiligently to make the Swift community welcoming to everyone.
To give clarity of what is expected of our members, Swift has adopted thecode of conduct defined by the Contributor Covenant. This document is usedacross many open source communities, and we think it articulates our valueswell. For more, see theCode of Conduct.
Seehttps://swift.org/LICENSE.txt for license information.
About
A high-level build system based on llbuild, used by Xcode, Swift Playground, and the Swift Package Manager
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.