Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A high-level build system based on llbuild, used by Xcode, Swift Playground, and the Swift Package Manager

License

NotificationsYou must be signed in to change notification settings

swiftlang/swift-build

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.

Usage

With SwiftPM

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.

With Xcode

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-selected 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.

With xcodebuild

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-selected 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.

Debugging

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.

Documentation

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

Testing

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.

Contributing to Swift Build

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.

License

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

Stars

Watchers

Forks

Contributors62

Languages


[8]ページ先頭

©2009-2025 Movatter.jp