build-script-impl: reorganise the option

This reorders the option list.  It tries to categorise them by area and
then sort them alphabetically.  This should help work through the list
and remove the now defunct options as well as try to reduce the set of
options into different build configurations that we can support and try
to organise the CMake invocations properly.

There is still a group of uncategorised options that should get sorted
out at some point.  However, this is still a huge step forward towards
simplifying (and hopefully eradicating) this monstrous script.
This commit is contained in:
Saleem Abdulrasool
2020-01-17 11:59:09 -08:00
parent 7b1e35bf2c
commit 6f096be5d5

View File

@@ -40,220 +40,256 @@ umask 0022
# Each variable name is re-exported into this script in uppercase, where dashes
# are substituted by underscores. For example, `swift-install-components` is
# referred to as `SWIFT_INSTALL_COMPONENTS` in the remainder of this script.
# name default description
KNOWN_SETTINGS=(
# name default description
dry-run "" "print the commands that would be executed, but do not execute them"
build-args "" "arguments to the build tool; defaults to -j8 when CMake generator is \"Unix Makefiles\""
build-dir "" "out-of-tree build directory; default is in-tree. **This argument is required**"
host-cc "" "the path to CC, the 'clang' compiler for the host platform. **This argument is required**"
host-cxx "" "the path to CXX, the 'clang++' compiler for the host platform. **This argument is required**"
host-lipo "" "the path to lipo for creating universal binaries on Darwin"
host-libtool "" "the path to libtool"
darwin-xcrun-toolchain "default" "the name of the toolchain to use on Darwin"
ninja-bin "" "the path to Ninja tool"
cmark-build-type "Debug" "the CMake build variant for CommonMark (Debug, RelWithDebInfo, Release, MinSizeRel). Defaults to Debug."
lldb-extra-cmake-args "" "extra command line args to pass to lldb cmake"
lldb-test-cc "" "CC to use for building LLDB testsuite test inferiors. Defaults to just-built, in-tree clang. If set to 'host-toolchain', sets it to same as host-cc."
lldb-test-swift-only "0" "when running lldb tests, only include Swift-specific tests"
lldb-no-debugserver "" "delete debugserver after building it, and don't try to codesign it"
lldb-use-system-debugserver "" "don't try to codesign debugserver, and use the system's debugserver instead"
lldb-assertions "1" "build lldb with assertions enabled"
lldb-test-swift-compatibility "" "specify additional Swift compilers to test lldb with"
llvm-build-type "Debug" "the CMake build variant for LLVM and Clang (Debug, RelWithDebInfo, Release, MinSizeRel). Defaults to Debug."
swift-build-type "Debug" "the CMake build variant for Swift"
swift-enable-assertions "1" "enable assertions in Swift"
swift-analyze-code-coverage "not-merged" "Code coverage analysis mode for Swift (false, not-merged, merged). Defaults to false if the argument is not present, and not-merged if the argument is present without a modifier."
swift-tools-enable-lto "" "enable LTO compilation of Swift tools. *NOTE* This does not include the swift standard library and runtime. Must be set to one of 'thin' or 'full'"
llvm-enable-lto "" "Must be set to one of 'thin' or 'full'"
llvm-enable-modules "0" "enable building llvm using modules"
swift-tools-num-parallel-lto-link-jobs "" "The number of parallel link jobs to use when compiling swift tools"
llvm-num-parallel-lto-link-jobs "" "The number of parallel link jobs to use when compiling llvm"
swift-stdlib-build-type "Debug" "the CMake build variant for Swift"
swift-stdlib-enable-assertions "1" "enable assertions in Swift"
swift-stdlib-use-nonatomic-rc "0" "build the Swift stdlib and overlays with nonatomic reference count operations enabled"
lldb-build-type "Debug" "the CMake build variant for LLDB"
llbuild-build-type "Debug" "the CMake build variant for llbuild"
foundation-build-type "Debug" "the build variant for Foundation"
libdispatch-build-type "Debug" "the build variant for libdispatch"
libicu-build-type "Debug" "the build variant for libicu"
playgroundsupport-build-type "Debug" "the build variant for PlaygroundSupport"
xctest-build-type "Debug" "the build variant for xctest"
llbuild-enable-assertions "1" "enable assertions in llbuild"
enable-asan "" "enable Address Sanitizer"
enable-ubsan "" "enable Undefined Behavior Sanitizer"
cmake "" "path to the cmake binary"
distcc "" "use distcc in pump mode"
distcc-pump "" "the path to distcc pump executable. This argument is required if distcc is set."
build-runtime-with-host-compiler "" "use the host c++ compiler to build everything"
cmake-generator "Unix Makefiles" "kind of build system to generate; see output of 'cmake --help' for choices"
verbose-build "" "print the commands executed during the build"
install-prefix "" "installation prefix"
toolchain-prefix "" "the path to the .xctoolchain directory that houses the install prefix path"
install-destdir "" "the path to use as the filesystem root for the installation"
install-symroot "" "the path to install debug symbols into"
swift-install-components "" "a semicolon-separated list of Swift components to install"
llvm-install-components "" "a semicolon-separated list of LLVM components to install"
installable-package "" "the path to the archive of the installation directory"
test-installable-package "" "whether to run post-packaging tests on the produced package"
reconfigure "" "force a CMake configuration run even if CMakeCache.txt already exists"
skip-reconfigure "" "set to skip reconfigure"
swift-primary-variant-sdk "" "default SDK for target binaries"
swift-primary-variant-arch "" "default arch for target binaries"
skip-build-cmark "" "set to skip building CommonMark"
skip-build-llvm "" "set to skip building LLVM/Clang"
skip-build-compiler-rt "" "set to skip building Compiler-RT"
skip-build-swift "" "set to skip building Swift"
skip-build-linux "" "set to skip building Swift stdlibs for Linux"
skip-build-freebsd "" "set to skip building Swift stdlibs for FreeBSD"
skip-build-cygwin "" "set to skip building Swift stdlibs for Cygwin"
skip-build-haiku "" "set to skip building Swift stdlibs for Haiku"
skip-build-osx "" "set to skip building Swift stdlibs for OS X"
skip-build-ios-device "" "set to skip building Swift stdlibs for iOS devices (i.e. build simulators only)"
skip-build-ios-simulator "" "set to skip building Swift stdlibs for iOS simulators (i.e. build devices only)"
skip-build-tvos-device "" "set to skip building Swift stdlibs for tvOS devices (i.e. build simulators only)"
skip-build-tvos-simulator "" "set to skip building Swift stdlibs for tvOS simulators (i.e. build devices only)"
skip-build-watchos-device "" "set to skip building Swift stdlibs for Apple watchOS devices (i.e. build simulators only)"
skip-build-watchos-simulator "" "set to skip building Swift stdlibs for Apple watchOS simulators (i.e. build devices only)"
skip-build-android "" "set to skip building Swift stdlibs for Android"
skip-build-lldb "" "set to skip building LLDB"
skip-build-llbuild "" "set to skip building llbuild"
skip-build-libcxx "" "set to skip building libcxx"
skip-build-xctest "" "set to skip building xctest"
skip-build-foundation "" "set to skip building foundation"
skip-build-libdispatch "" "set to skip building libdispatch"
skip-build-libicu "" "set to skip building libicu"
skip-build-benchmarks "" "set to skip building Swift Benchmark Suite"
skip-build-external-benchmarks "1" "set to skip building the external Swift Benchmark Suite. (skipped by default)"
skip-build-playgroundsupport "" "set to skip building PlaygroundSupport"
skip-build-clang-tools-extra "" "set to skip building clang-tools-extra as part of llvm"
skip-local-build "" "set to skip building for the current host (useful when crosscompiling)"
skip-test-cmark "" "set to skip testing CommonMark"
skip-test-lldb "" "set to skip testing lldb"
skip-test-swift "" "set to skip testing Swift"
skip-test-llbuild "" "set to skip testing llbuild"
skip-test-xctest "" "set to skip testing xctest"
skip-test-foundation "" "set to skip testing foundation"
skip-test-libdispatch "" "set to skip testing libdispatch"
skip-test-libicu "" "set to skip testing libicu"
skip-test-playgroundsupport "" "set to skip testing PlaygroundSupport"
skip-test-linux "" "set to skip testing Swift stdlibs for Linux"
skip-test-freebsd "" "set to skip testing Swift stdlibs for FreeBSD"
skip-test-cygwin "" "set to skip testing Swift stdlibs for Cygwin"
skip-test-haiku "" "set to skip testing Swift stdlibs for Haiku"
skip-test-osx "" "set to skip testing Swift stdlibs for OS X"
skip-test-ios-32bit-simulator "" "set to skip testing Swift stdlibs for iOS 32bit simulators"
skip-test-ios-simulator "" "set to skip testing Swift stdlibs for iOS simulators (i.e. test devices only)"
skip-test-ios-host "" "set to skip testing the host parts of the iOS toolchain"
skip-test-tvos-simulator "" "set to skip testing Swift stdlibs for tvOS simulators (i.e. test devices only)"
skip-test-tvos-host "" "set to skip testing the host parts of the tvOS toolchain"
skip-test-watchos-simulator "" "set to skip testing Swift stdlibs for Apple watchOS simulators (i.e. test devices only)"
skip-test-watchos-host "" "set to skip testing the host parts of the watchOS toolchain"
skip-test-android "" "set to skip testing Swift stdlibs for Android"
skip-test-android-host "" "set to skip testing the host parts of the Android toolchain"
validation-test "0" "set to run the validation test suite"
long-test "0" "set to run the long test suite"
stress-test "0" "set to run the stress test suite"
test-paths "" "run tests located in specific directories and/or files"
skip-test-benchmarks "" "set to skip running Swift Benchmark Suite"
skip-test-optimized "" "set to skip testing the test suite in optimized mode"
skip-test-optimize-for-size "" "set to skip testing the test suite in optimize for size mode"
skip-test-optimize-none-with-implicit-dynamic "" "set to skip testing the test suite in optimize none with implicit dynamic mode"
skip-test-sourcekit "" "set to skip testing SourceKit"
stress-test-sourcekit "" "set to run the stress-SourceKit target"
only-executable-test "" "only run the executable variant of the swift lit tests"
workspace "${HOME}/src" "source directory containing llvm, clang, swift"
enable-llvm-assertions "1" "set to enable llvm assertions"
build-llvm "1" "set to 1 to build LLVM and Clang"
build-swift-tools "1" "set to 1 to build Swift host tools"
build-swift-dynamic-stdlib "" "set to 1 to build dynamic variants of the Swift standard library"
build-swift-static-stdlib "" "set to 1 to build static variants of the Swift standard library"
build-swift-stdlib-unittest-extra "0" "set to 1 to build optional StdlibUnittest components"
build-swift-dynamic-sdk-overlay "" "set to 1 to build dynamic variants of the Swift SDK overlay"
build-swift-static-sdk-overlay "" "set to 1 to build static variants of the Swift SDK overlay"
build-swift-examples "1" "set to 1 to build examples"
build-swift-remote-mirror "1" "set to 1 to build the Swift Remote Mirror library"
build-sil-debugging-stdlib "0" "set to 1 to build the Swift standard library with -gsil to enable debugging and profiling on SIL level"
check-incremental-compilation "0" "set to 1 to compile swift libraries multiple times to check if incremental compilation works"
report-statistics "0" "set to 1 to generate compilation statistics files for swift libraries"
llvm-include-tests "1" "Set to true to generate testing targets for LLVM. Set to true by default."
swift-include-tests "1" "Set to true to generate testing targets for Swift. This allows the build to proceed when 'test' directory is missing (required for B&I builds)"
native-llvm-tools-path "" "directory that contains LLVM tools that are executable on the build machine"
native-clang-tools-path "" "directory that contains Clang tools that are executable on the build machine"
native-swift-tools-path "" "directory that contains Swift tools that are executable on the build machine"
embed-bitcode-section "0" "embed an LLVM bitcode section in stdlib/overlay binaries for supported platforms"
darwin-crash-reporter-client "" "whether to enable CrashReporter integration"
darwin-stdlib-install-name-dir "" "the directory of the install_name for standard library dylibs"
install-cmark "" "whether to install cmark"
install-swift "" "whether to install Swift"
install-lldb "" "whether to install LLDB"
install-llbuild "" "whether to install llbuild"
install-xctest "" "whether to install xctest"
install-foundation "" "whether to install foundation"
install-libcxx "" "whether to install libc++"
install-libdispatch "" "whether to install libdispatch"
install-libicu "" "whether to install libicu"
install-playgroundsupport "" "whether to install PlaygroundSupport"
darwin-install-extract-symbols "" "whether to extract symbols with dsymutil during installations"
host-target "" "The host target. LLVM, Clang, and Swift will be built for this target. The built LLVM and Clang will be used to compile Swift for the cross-compilation targets. **This argument is required**"
stdlib-deployment-targets "" "space-separated list of targets to configure the Swift standard library to be compiled or cross-compiled for"
build-stdlib-deployment-targets "all" "space-separated list that filters which of the configured targets to build the Swift standard library for, or 'all'"
cross-compile-hosts "" "space-separated list of targets to cross-compile host Swift tools for"
cross-compile-with-host-tools "" "set to use the clang we build for the host to then build the cross-compile hosts"
cross-compile-install-prefixes "" "semicolon-separated list of install prefixes to use for the cross-compiled hosts. The list expands, so if there are more cross-compile hosts than prefixes, unmatched hosts use the last prefix in the list"
skip-merge-lipo-cross-compile-tools "" "set to skip running merge-lipo after installing cross-compiled host Swift tools"
darwin-deployment-version-osx "10.9" "minimum deployment target version for OS X"
darwin-deployment-version-ios "7.0" "minimum deployment target version for iOS"
darwin-deployment-version-tvos "9.0" "minimum deployment target version for tvOS"
darwin-deployment-version-watchos "2.0" "minimum deployment target version for watchOS"
extra-cmake-options "" "Extra options to pass to CMake for all targets"
extra-swift-args "" "Extra arguments to pass to swift modules which match regex. Assumed to be a flattened cmake list consisting of [module_regexp, args, module_regexp, args, ...]"
sil-verify-all "0" "If enabled, run the SIL verifier after each transform when building Swift files during this build process"
swift-enable-ast-verifier "1" "If enabled, and the assertions are enabled, the built Swift compiler will run the AST verifier every time it is invoked"
swift-runtime-enable-leak-checker "0" "Enable leaks checking routines in the runtime"
use-gold-linker "" "Enable using the gold linker"
darwin-toolchain-bundle-identifier "" "CFBundleIdentifier for xctoolchain info plist"
darwin-toolchain-display-name "" "Display Name for xctoolcain info plist"
darwin-toolchain-display-name-short "" "Display Name with out date for xctoolchain info plist"
darwin-toolchain-name "" "Directory name for xctoolchain"
darwin-toolchain-version "" "Version for xctoolchain info plist and installer pkg"
darwin-toolchain-application-cert "" "Application Cert name to codesign xctoolchain"
darwin-toolchain-installer-cert "" "Installer Cert name to create installer pkg"
darwin-toolchain-installer-package "" "The path to installer pkg"
darwin-sdk-deployment-targets "xctest-ios-8.0" "semicolon-separated list of triples like 'fookit-ios-9.0;barkit-watchos-9.0'"
darwin-overlay-target "" "single overlay target to build, dependencies are computed later"
build-jobs "" "The number of parallel build jobs to use"
darwin-toolchain-alias "" "Swift alias for toolchain"
android-ndk "" "An absolute path to the NDK that will be used as a libc implementation for Android builds"
android-api-level "" "The Android API level to target when building for Android. Currently only 21 or above is supported"
android-ndk-gcc-version "" "The GCC version to use when building for Android. Currently only 4.9 is supported"
android-icu-uc "" "Path to libicuuc.so"
android-icu-uc-include "" "Path to a directory containing headers for libicuuc"
android-icu-i18n "" "Path to libicui18n.so"
android-icu-i18n-include "" "Path to a directory containing headers libicui18n"
android-icu-data "" "Path to libicudata.so"
android-deploy-device-path "" "Path on an Android device to which built Swift stdlib products will be deployed"
android-arch "armv7" "The Android target architecture when building for Android"
check-args-only "" "set to check all arguments are known. Exit with status 0 if success, non zero otherwise"
common-cmake-options "" "CMake options used for all targets, including LLVM/Clang"
cmark-cmake-options "" "CMake options used for all cmark targets"
ninja-cmake-options "" "CMake options used for all ninja targets"
foundation-cmake-options "" "CMake options used for all foundation targets"
libdispatch-cmake-options "" "CMake options used for all libdispatch targets"
libicu-cmake-options "" "CMake options used for all libicu targets"
llbuild-cmake-options "" "CMake options used for all llbuild targets"
lldb-cmake-options "" "CMake options used for all lldb targets"
llvm-cmake-options "" "CMake options used for all llvm targets"
ninja-cmake-options "" "CMake options used for all ninja targets"
swift-cmake-options "" "CMake options used for all swift targets"
xctest-cmake-options "" "CMake options used for all xctest targets"
playgroundsupport-cmake-options "" "CMake options used for all playgroundsupport targets"
only-execute "all" "Only execute the named action (see implementation)"
llvm-lit-args "" "If set, override the lit args passed to LLVM"
clang-profile-instr-use "" "If set, profile file to use for clang PGO while building llvm/clang"
swift-profile-instr-use "" "If set, profile file to use for clang PGO while building swift"
coverage-db "" "If set, coverage database to use when prioritizing testing"
build-toolchain-only "" "If set, only build the necessary tools to build an external toolchain"
skip-local-host-install "" "If we are cross-compiling multiple targets, skip an install pass locally if the hosts match"
## Debugging Options
dry-run "" "print the commands that would be executed, but do not execute them"
verbose-build "" "print the commands executed during the build"
check-args-only "" "set to check all arguments are known. Exit with status 0 if success, non zero otherwise"
only-execute "all" "Only execute the named action (see implementation)"
check-incremental-compilation "0" "set to 1 to compile swift libraries multiple times to check if incremental compilation works"
## Build Mode Options
enable-asan "" "enable Address Sanitizer"
enable-ubsan "" "enable Undefined Behavior Sanitizer"
clang-profile-instr-use "" "If set, profile file to use for clang PGO while building llvm/clang"
swift-profile-instr-use "" "If set, profile file to use for clang PGO while building swift"
## Build Tool Settings
build-args "" "arguments to the build tool; defaults to -j8 when CMake generator is \"Unix Makefiles\""
build-dir "" "out-of-tree build directory; default is in-tree. **This argument is required**"
build-jobs "" "The number of parallel build jobs to use"
build-runtime-with-host-compiler "" "use the host c++ compiler to build everything"
build-stdlib-deployment-targets "all" "space-separated list that filters which of the configured targets to build the Swift standard library for, or 'all'"
build-toolchain-only "" "If set, only build the necessary tools to build an external toolchain"
cmake-generator "Unix Makefiles" "kind of build system to generate; see output of 'cmake --help' for choices"
llvm-num-parallel-lto-link-jobs "" "The number of parallel link jobs to use when compiling llvm"
reconfigure "" "force a CMake configuration run even if CMakeCache.txt already exists"
skip-reconfigure "" "set to skip reconfigure"
swift-tools-num-parallel-lto-link-jobs "" "The number of parallel link jobs to use when compiling swift tools"
use-gold-linker "" "Enable using the gold linker"
workspace "${HOME}/src" "source directory containing llvm, clang, swift"
## Build Tools
host-cc "" "the path to CC, the 'clang' compiler for the host platform. **This argument is required**"
host-cxx "" "the path to CXX, the 'clang++' compiler for the host platform. **This argument is required**"
host-libtool "" "the path to libtool"
host-lipo "" "the path to lipo for creating universal binaries on Darwin"
cmake "" "path to the cmake binary"
distcc "" "use distcc in pump mode"
distcc-pump "" "the path to distcc pump executable. This argument is required if distcc is set."
ninja-bin "" "the path to Ninja tool"
## Android Options
android-api-level "" "The Android API level to target when building for Android. Currently only 21 or above is supported"
android-arch "armv7" "The Android target architecture when building for Android"
android-deploy-device-path "" "Path on an Android device to which built Swift stdlib products will be deployed"
android-icu-data "" "Path to libicudata.so"
android-icu-i18n "" "Path to libicui18n.so"
android-icu-i18n-include "" "Path to a directory containing headers libicui18n"
android-icu-uc "" "Path to libicuuc.so"
android-icu-uc-include "" "Path to a directory containing headers for libicuuc"
android-ndk "" "An absolute path to the NDK that will be used as a libc implementation for Android builds"
android-ndk-gcc-version "" "The GCC version to use when building for Android. Currently only 4.9 is supported"
## Darwin Options
darwin-crash-reporter-client "" "whether to enable CrashReporter integration"
darwin-deployment-version-ios "7.0" "minimum deployment target version for iOS"
darwin-deployment-version-osx "10.9" "minimum deployment target version for OS X"
darwin-deployment-version-tvos "9.0" "minimum deployment target version for tvOS"
darwin-deployment-version-watchos "2.0" "minimum deployment target version for watchOS"
darwin-install-extract-symbols "" "whether to extract symbols with dsymutil during installations"
darwin-overlay-target "" "single overlay target to build, dependencies are computed later"
darwin-sdk-deployment-targets "xctest-ios-8.0" "semicolon-separated list of triples like 'fookit-ios-9.0;barkit-watchos-9.0'"
darwin-stdlib-install-name-dir "" "the directory of the install_name for standard library dylibs"
darwin-toolchain-alias "" "Swift alias for toolchain"
darwin-toolchain-application-cert "" "Application Cert name to codesign xctoolchain"
darwin-toolchain-bundle-identifier "" "CFBundleIdentifier for xctoolchain info plist"
darwin-toolchain-display-name "" "Display Name for xctoolcain info plist"
darwin-toolchain-display-name-short "" "Display Name with out date for xctoolchain info plist"
darwin-toolchain-installer-cert "" "Installer Cert name to create installer pkg"
darwin-toolchain-installer-package "" "The path to installer pkg"
darwin-toolchain-name "" "Directory name for xctoolchain"
darwin-toolchain-version "" "Version for xctoolchain info plist and installer pkg"
darwin-xcrun-toolchain "default" "the name of the toolchain to use on Darwin"
## Build Types for Components
cmark-build-type "Debug" "the CMake build variant for CommonMark (Debug, RelWithDebInfo, Release, MinSizeRel). Defaults to Debug."
foundation-build-type "Debug" "the build variant for Foundation"
libdispatch-build-type "Debug" "the build variant for libdispatch"
libicu-build-type "Debug" "the build variant for libicu"
llbuild-build-type "Debug" "the CMake build variant for llbuild"
lldb-build-type "Debug" "the CMake build variant for LLDB"
llvm-build-type "Debug" "the CMake build variant for LLVM and Clang (Debug, RelWithDebInfo, Release, MinSizeRel). Defaults to Debug."
playgroundsupport-build-type "Debug" "the build variant for PlaygroundSupport"
swift-build-type "Debug" "the CMake build variant for Swift"
swift-stdlib-build-type "Debug" "the CMake build variant for Swift"
xctest-build-type "Debug" "the build variant for xctest"
## Skip Build ...
skip-build-android "" "set to skip building Swift stdlibs for Android"
skip-build-benchmarks "" "set to skip building Swift Benchmark Suite"
skip-build-clang-tools-extra "" "set to skip building clang-tools-extra as part of llvm"
skip-build-cmark "" "set to skip building CommonMark"
skip-build-compiler-rt "" "set to skip building Compiler-RT"
skip-build-cygwin "" "set to skip building Swift stdlibs for Cygwin"
skip-build-external-benchmarks "1" "set to skip building the external Swift Benchmark Suite. (skipped by default)"
skip-build-foundation "" "set to skip building foundation"
skip-build-freebsd "" "set to skip building Swift stdlibs for FreeBSD"
skip-build-haiku "" "set to skip building Swift stdlibs for Haiku"
skip-build-ios-device "" "set to skip building Swift stdlibs for iOS devices (i.e. build simulators only)"
skip-build-ios-simulator "" "set to skip building Swift stdlibs for iOS simulators (i.e. build devices only)"
skip-build-libcxx "" "set to skip building libcxx"
skip-build-libdispatch "" "set to skip building libdispatch"
skip-build-libicu "" "set to skip building libicu"
skip-build-linux "" "set to skip building Swift stdlibs for Linux"
skip-build-llbuild "" "set to skip building llbuild"
skip-build-lldb "" "set to skip building LLDB"
skip-build-llvm "" "set to skip building LLVM/Clang"
skip-build-osx "" "set to skip building Swift stdlibs for OS X"
skip-build-playgroundsupport "" "set to skip building PlaygroundSupport"
skip-build-swift "" "set to skip building Swift"
skip-build-tvos-device "" "set to skip building Swift stdlibs for tvOS devices (i.e. build simulators only)"
skip-build-tvos-simulator "" "set to skip building Swift stdlibs for tvOS simulators (i.e. build devices only)"
skip-build-watchos-device "" "set to skip building Swift stdlibs for Apple watchOS devices (i.e. build simulators only)"
skip-build-watchos-simulator "" "set to skip building Swift stdlibs for Apple watchOS simulators (i.e. build devices only)"
skip-build-xctest "" "set to skip building xctest"
## Skip Test ...
skip-test-android "" "set to skip testing Swift stdlibs for Android"
skip-test-android-host "" "set to skip testing the host parts of the Android toolchain"
skip-test-cmark "" "set to skip testing CommonMark"
skip-test-cygwin "" "set to skip testing Swift stdlibs for Cygwin"
skip-test-foundation "" "set to skip testing foundation"
skip-test-freebsd "" "set to skip testing Swift stdlibs for FreeBSD"
skip-test-haiku "" "set to skip testing Swift stdlibs for Haiku"
skip-test-ios-32bit-simulator "" "set to skip testing Swift stdlibs for iOS 32bit simulators"
skip-test-ios-host "" "set to skip testing the host parts of the iOS toolchain"
skip-test-ios-simulator "" "set to skip testing Swift stdlibs for iOS simulators (i.e. test devices only)"
skip-test-libdispatch "" "set to skip testing libdispatch"
skip-test-libicu "" "set to skip testing libicu"
skip-test-linux "" "set to skip testing Swift stdlibs for Linux"
skip-test-llbuild "" "set to skip testing llbuild"
skip-test-lldb "" "set to skip testing lldb"
skip-test-osx "" "set to skip testing Swift stdlibs for OS X"
skip-test-playgroundsupport "" "set to skip testing PlaygroundSupport"
skip-test-swift "" "set to skip testing Swift"
skip-test-tvos-host "" "set to skip testing the host parts of the tvOS toolchain"
skip-test-tvos-simulator "" "set to skip testing Swift stdlibs for tvOS simulators (i.e. test devices only)"
skip-test-watchos-host "" "set to skip testing the host parts of the watchOS toolchain"
skip-test-watchos-simulator "" "set to skip testing Swift stdlibs for Apple watchOS simulators (i.e. test devices only)"
skip-test-xctest "" "set to skip testing xctest"
skip-test-benchmarks "" "set to skip running Swift Benchmark Suite"
skip-test-optimized "" "set to skip testing the test suite in optimized mode"
skip-test-optimize-for-size "" "set to skip testing the test suite in optimize for size mode"
skip-test-optimize-none-with-implicit-dynamic "" "set to skip testing the test suite in optimize none with implicit dynamic mode"
skip-test-sourcekit "" "set to skip testing SourceKit"
## Extra ... CMake Options
cmark-cmake-options "" "CMake options used for all cmark targets"
common-cmake-options "" "CMake options used for all targets, including LLVM/Clang"
extra-cmake-options "" "Extra options to pass to CMake for all targets"
foundation-cmake-options "" "CMake options used for all foundation targets"
libdispatch-cmake-options "" "CMake options used for all libdispatch targets"
libicu-cmake-options "" "CMake options used for all libicu targets"
llbuild-cmake-options "" "CMake options used for all llbuild targets"
lldb-cmake-options "" "CMake options used for all lldb targets"
llvm-cmake-options "" "CMake options used for all llvm targets"
ninja-cmake-options "" "CMake options used for all ninja targets"
ninja-cmake-options "" "CMake options used for all ninja targets"
playgroundsupport-cmake-options "" "CMake options used for all playgroundsupport targets"
swift-cmake-options "" "CMake options used for all swift targets"
xctest-cmake-options "" "CMake options used for all xctest targets"
## Build ...
build-llvm "1" "set to 1 to build LLVM and Clang"
build-sil-debugging-stdlib "0" "set to 1 to build the Swift standard library with -gsil to enable debugging and profiling on SIL level"
build-swift-dynamic-sdk-overlay "" "set to 1 to build dynamic variants of the Swift SDK overlay"
build-swift-dynamic-stdlib "" "set to 1 to build dynamic variants of the Swift standard library"
build-swift-examples "1" "set to 1 to build examples"
build-swift-remote-mirror "1" "set to 1 to build the Swift Remote Mirror library"
build-swift-static-sdk-overlay "" "set to 1 to build static variants of the Swift SDK overlay"
build-swift-static-stdlib "" "set to 1 to build static variants of the Swift standard library"
build-swift-stdlib-unittest-extra "0" "set to 1 to build optional StdlibUnittest components"
build-swift-tools "1" "set to 1 to build Swift host tools"
## Test Options
llvm-include-tests "1" "Set to true to generate testing targets for LLVM. Set to true by default."
long-test "0" "set to run the long test suite"
only-executable-test "" "only run the executable variant of the swift lit tests"
stress-test "0" "set to run the stress test suite"
stress-test-sourcekit "" "set to run the stress-SourceKit target"
swift-include-tests "1" "Set to true to generate testing targets for Swift. This allows the build to proceed when 'test' directory is missing (required for B&I builds)"
validation-test "0" "set to run the validation test suite"
## Install ...
install-cmark "" "whether to install cmark"
install-foundation "" "whether to install foundation"
install-libcxx "" "whether to install libc++"
install-libdispatch "" "whether to install libdispatch"
install-libicu "" "whether to install libicu"
install-llbuild "" "whether to install llbuild"
install-lldb "" "whether to install LLDB"
install-playgroundsupport "" "whether to install PlaygroundSupport"
install-swift "" "whether to install Swift"
install-xctest "" "whether to install xctest"
## llbuild Options
llbuild-enable-assertions "1" "enable assertions in llbuild"
## LLDB Options
lldb-assertions "1" "build lldb with assertions enabled"
lldb-extra-cmake-args "" "extra command line args to pass to lldb cmake"
lldb-no-debugserver "" "delete debugserver after building it, and don't try to codesign it"
lldb-test-cc "" "CC to use for building LLDB testsuite test inferiors. Defaults to just-built, in-tree clang. If set to 'host-toolchain', sets it to same as host-cc."
lldb-test-swift-compatibility "" "specify additional Swift compilers to test lldb with"
lldb-test-swift-only "0" "when running lldb tests, only include Swift-specific tests"
lldb-use-system-debugserver "" "don't try to codesign debugserver, and use the system's debugserver instead"
## LLVM Options
llvm-enable-lto "" "Must be set to one of 'thin' or 'full'"
llvm-enable-modules "0" "enable building llvm using modules"
llvm-install-components "" "a semicolon-separated list of LLVM components to install"
llvm-lit-args "" "If set, override the lit args passed to LLVM"
enable-llvm-assertions "1" "set to enable llvm assertions"
## Swift Options
swift-analyze-code-coverage "not-merged" "Code coverage analysis mode for Swift (false, not-merged, merged). Defaults to false if the argument is not present, and not-merged if the argument is present without a modifier."
swift-enable-assertions "1" "enable assertions in Swift"
swift-enable-ast-verifier "1" "If enabled, and the assertions are enabled, the built Swift compiler will run the AST verifier every time it is invoked"
swift-install-components "" "a semicolon-separated list of Swift components to install"
swift-primary-variant-arch "" "default arch for target binaries"
swift-primary-variant-sdk "" "default SDK for target binaries"
swift-runtime-enable-leak-checker "0" "Enable leaks checking routines in the runtime"
swift-stdlib-enable-assertions "1" "enable assertions in Swift"
swift-stdlib-use-nonatomic-rc "0" "build the Swift stdlib and overlays with nonatomic reference count operations enabled"
swift-tools-enable-lto "" "enable LTO compilation of Swift tools. *NOTE* This does not include the swift standard library and runtime. Must be set to one of 'thin' or 'full'"
extra-swift-args "" "Extra arguments to pass to swift modules which match regex. Assumed to be a flattened cmake list consisting of [module_regexp, args, module_regexp, args, ...]"
report-statistics "0" "set to 1 to generate compilation statistics files for swift libraries"
sil-verify-all "0" "If enabled, run the SIL verifier after each transform when building Swift files during this build process"
stdlib-deployment-targets "" "space-separated list of targets to configure the Swift standard library to be compiled or cross-compiled for"
## Uncategorised
install-prefix "" "installation prefix"
toolchain-prefix "" "the path to the .xctoolchain directory that houses the install prefix path"
install-destdir "" "the path to use as the filesystem root for the installation"
install-symroot "" "the path to install debug symbols into"
installable-package "" "the path to the archive of the installation directory"
test-installable-package "" "whether to run post-packaging tests on the produced package"
skip-local-build "" "set to skip building for the current host (useful when crosscompiling)"
test-paths "" "run tests located in specific directories and/or files"
native-llvm-tools-path "" "directory that contains LLVM tools that are executable on the build machine"
native-clang-tools-path "" "directory that contains Clang tools that are executable on the build machine"
native-swift-tools-path "" "directory that contains Swift tools that are executable on the build machine"
embed-bitcode-section "0" "embed an LLVM bitcode section in stdlib/overlay binaries for supported platforms"
host-target "" "The host target. LLVM, Clang, and Swift will be built for this target. The built LLVM and Clang will be used to compile Swift for the cross-compilation targets. **This argument is required**"
cross-compile-hosts "" "space-separated list of targets to cross-compile host Swift tools for"
cross-compile-with-host-tools "" "set to use the clang we build for the host to then build the cross-compile hosts"
cross-compile-install-prefixes "" "semicolon-separated list of install prefixes to use for the cross-compiled hosts. The list expands, so if there are more cross-compile hosts than prefixes, unmatched hosts use the last prefix in the list"
skip-merge-lipo-cross-compile-tools "" "set to skip running merge-lipo after installing cross-compiled host Swift tools"
coverage-db "" "If set, coverage database to use when prioritizing testing"
skip-local-host-install "" "If we are cross-compiling multiple targets, skip an install pass locally if the hosts match"
)
# Centralized access point for traced command invocation.