* take the chance to rename the containing folder, as in this context it should be clear we are talking about the Runtime module and not the Swift runtime * this will fail to build for Apple platforms until we land #84388 -- to signal this, comment the invocations that would add the dependency on the Darwin overlay * piggyback a fix to ensure we rebuild always all the external projects in the Supplemental superbuild used in macOS PR testing Addresses rdar://160774902
Swift Supplemental Libraries
The supplemental libraries are all libraries that are not one of the Core or overlay libraries. Each supplemental library builds as an independent project.
The supplemental libraries are:
- CxxInterop
- Differentiation
- Distributed
- Observation
- StringProcessing
- Runtime
- Synchronization
The top-level Supplemental CMakeLists supplies a super-build pattern for
configuring and compiling each of the supplemental library projects through a
single CMake invocation. The Swift_ENABLE_RUNTIMES CMake option enables the
specified supplemental libraries. All libraries configured this way are built
with the same compilers, against the same sysroot, with the same target triple
and installed into the same location.
Super-Build
Configuring each project independently is tedious. The Supplemental directory contains a Super-Build CMakeLists that invokes the build of each of the supplemental libraries in the appropriate order, simplifying the process of building each library.
Important configuration variables:
Swift_ENABLE_RUNTIMES: Used to configure which runtime libraries are built.
The super-build forwards the following variables to each sub-project unconditionally:
BUILD_SHARED_LIBSCMAKE_BUILD_TYPECMAKE_INSTALL_PREFIXCMAKE_COLOR_DIAGNOSTICSCMAKE_C_COMPILERCMAKE_C_COMPILER_TARGETCMAKE_CXX_COMPILERCMAKE_CXX_COMPILER_TARGETCMAKE_Swift_COMPILERCMAKE_Swift_COMPILER_TARGET
If set, the super-build forwards the following values to each sub-project:
SwiftCore_DIR: Path to the SwiftCore build directoryCMAKE_MAKE_PROGRAM: Path toninja
The super-build is for convenience. If more fine-grained control is desired for configuring a specific runtime library, you may configure that library independently.