apple/swift
Dependencies
The Swift toolchain depends on a number of side-by-side checkouts. utils/update-checkout keeps them at compatible revisions; the canonical list is utils/update-checkout/update-checkout-config.json.
Required side-by-side repos
| Repo | Purpose |
|---|---|
apple/llvm-project |
The Swift fork of LLVM. Provides clang, lldb, lld, the LLVM libraries IRGen and the optimizer link against. |
apple/swift-cmark |
CommonMark parser used for doc-comment markup. |
apple/swift-driver |
The Swift-implemented driver; the default user-facing front-end. |
apple/swift-tools-support-core |
Common utilities used by SwiftPM, swift-driver, etc. |
apple/swift-package-manager |
swift package, swift build, swift test. |
apple/swift-syntax |
Swift-implemented Syntax tree + parser library. |
apple/swift-corelibs-foundation |
The Foundation overlay implementation for non-Apple platforms. |
apple/swift-corelibs-libdispatch |
libdispatch for non-Apple platforms. |
apple/swift-corelibs-xctest |
The XCTest implementation for non-Apple platforms. |
apple/swift-experimental-string-processing |
Upstream of the in-tree regex modules. |
apple/llbuild |
Low-level build engine used by SwiftPM. |
apple/yams, apple/swift-collections, and others |
Pulled in by SwiftPM. |
The full list (with revisions per release branch) is in utils/update-checkout/update-checkout-config.json.
How they fit together
graph TD
Swift[apple/swift] --> LLVM[apple/llvm-project]
Swift --> SwiftSyntax[apple/swift-syntax]
Swift --> SwiftDriver[apple/swift-driver]
Swift --> SwiftPM[apple/swift-package-manager]
Swift --> CMark[apple/swift-cmark]
Swift --> StringProcessing[apple/swift-experimental-string-processing]
Foundation[apple/swift-corelibs-foundation] --> Swift
Dispatch[apple/swift-corelibs-libdispatch] --> Swift
XCTest[apple/swift-corelibs-xctest] --> Swift
SwiftPM --> Driver[swift-driver]
SwiftPM --> TSC[swift-tools-support-core]
SwiftPM --> LLBuild[swift-llbuild]When you run update-checkout, it clones (or pulls) all of these into the same parent directory. build-script walks them and invokes their build systems in dependency order.
Build-time dependencies
Beyond the side-by-side repos, the build needs:
- A C++17 toolchain (Clang on Linux/macOS, MSVC + clang-cl on Windows).
- Python 3.6+ for the build scripts and
gyb. - CMake 3.x and Ninja.
- Platform-specific bits (libicu, libpython3, sqlite3, swig on Linux; Visual Studio + Windows SDK on Windows).
See docs/HowToGuides/GettingStarted.md for the per-platform list.
Runtime dependencies
A built Swift program depends on:
- The Swift runtime (
libswiftCore.dylib/libswiftCore.so/ static-linked equivalent). - The Swift Concurrency overlay (
libswift_Concurrency.dylib/.so). - libdispatch (Apple), or the corelibs version on Linux.
- The platform's C/C++ runtime.
For embedded targets, the runtime is replaced by SwiftDirectRuntime and most of the standard library is unavailable.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.