Skip to content

Commit 4ca2eb4

Browse files
committed
Build Preset: Bootstrap Stage-0 Toolchain
This preset builds the compiler and standard library on a system without an existing Swift. Note, there are many issues with it and it won't be able to pass tests. It is an intermediate product that will need to build a compiler with the Swift sources. The stage-0 compiler won't be able to build the driver as the driver depends on Foundation, which requires macro support and the stage-0 compiler does not have macro support. It will need to build swiftsyntax though to give the stage-1 compiler macro support. The stage-1 compiler then can build a stage-2 toolchain with most of the libraries and runtimes. That stage-2 toolchain should then be capable of building the full nightly toolchain package.
1 parent 42ad91e commit 4ca2eb4

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

utils/build-presets.ini

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3105,3 +3105,45 @@ skip-test-foundation
31053105

31063106
llvm-cmake-options=
31073107
-DCLANG_DEFAULT_LINKER=gold
3108+
3109+
#===------------------------------------------------------------------------===#
3110+
# Toolchain Bootstrapping Stages
3111+
#===------------------------------------------------------------------------===#
3112+
# Build Requirements:
3113+
# - C and C++ compiler
3114+
# Toolchain Outputs:
3115+
# - Swift Compiler
3116+
# C++ Driver
3117+
# No Macro Support
3118+
# No Swift Compiler Sources
3119+
# Runtime Outputs:
3120+
# - Swift Standard Library
3121+
# swiftCore
3122+
# OnoneSupport
3123+
# Concurrency
3124+
[preset: bootstrap_stage0]
3125+
mixin-preset=
3126+
mixin_buildbot_linux,no_test
3127+
3128+
swift-include-tests=0
3129+
llvm-include-tests=0
3130+
3131+
release
3132+
3133+
skip-early-swiftsyntax
3134+
skip-early-swift-driver
3135+
skip-build-benchmarks
3136+
3137+
build-runtime-with-host-compiler=0
3138+
build-swift-libexec=0
3139+
build-swift-remote-mirror=0
3140+
3141+
swift-install-components=autolink-driver;compiler;clang-resource-dir-symlink;stdlib;sdk-overlay;toolchain-tools
3142+
llvm-install-components=llvm-ar;llvm-ranlib;clang;clang-resource-headers;compiler-rt;clang-features-file;llvm-symbolizer
3143+
3144+
extra-cmake-options=
3145+
-DLLVM_TARGETS_TO_BUILD=AArch64;X86
3146+
3147+
swift-cmake-options=
3148+
-DSWIFT_ENABLE_SWIFT_IN_SWIFT:BOOL=NO
3149+
-DSWIFT_INCLUDE_DOCS:BOOL=NO

0 commit comments

Comments
 (0)