internal/rosa/llvm: update configuration for early runtimes
All checks were successful
Test / Sandbox (push) Successful in 2m2s
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (race detector) (push) Successful in 3m1s
Test / ShareFS (push) Successful in 3m18s
Test / Hakurei (race detector) (push) Successful in 10m2s
Test / Hakurei (push) Successful in 2m45s
Test / Flake checks (push) Successful in 1m56s

These were never updated when the bootstrap was moved to stage0-only.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-05 04:38:17 +09:00
parent 18b3b7904e
commit 4c7c0fbfc6

View File

@@ -39,16 +39,23 @@ func (t Toolchain) newEarlyCompilerRT() (pkg.Artifact, string) {
Append: []string{"compiler-rt"}, Append: []string{"compiler-rt"},
Cache: []KV{ Cache: []KV{
{"ENABLE_LINKER_BUILD_ID", "ON"},
// libc++ not yet available // libc++ not yet available
{"CMAKE_CXX_COMPILER_TARGET", ""}, {"CMAKE_CXX_COMPILER_TARGET", ""},
{"LLVM_HOST_TRIPLE", `"${ROSA_TRIPLE}"`}, {"LLVM_HOST_TRIPLE", `"${ROSA_TRIPLE}"`},
{"LLVM_DEFAULT_TARGET_TRIPLE", `"${ROSA_TRIPLE}"`}, {"LLVM_DEFAULT_TARGET_TRIPLE", `"${ROSA_TRIPLE}"`},
{"LLVM_ENABLE_RTTI", "ON"},
{"LLVM_BUILD_LLVM_DYLIB", "ON"},
{"LLVM_LINK_LLVM_DYLIB", "ON"},
{"LLVM_ENABLE_PER_TARGET_RUNTIME_DIR", "ON"}, {"LLVM_ENABLE_PER_TARGET_RUNTIME_DIR", "ON"},
{"COMPILER_RT_BUILD_BUILTINS", "ON"}, {"COMPILER_RT_BUILD_BUILTINS", "ON"},
{"COMPILER_RT_DEFAULT_TARGET_ONLY", "OFF"}, {"COMPILER_RT_DEFAULT_TARGET_ONLY", "ON"},
{"COMPILER_RT_USE_BUILTINS_LIBRARY", "ON"},
{"COMPILER_RT_SANITIZERS_TO_BUILD", "asan"}, {"COMPILER_RT_SANITIZERS_TO_BUILD", "asan"},
{"COMPILER_RT_BUILD_GWP_ASAN", "OFF"},
// does not work without libunwind // does not work without libunwind
{"COMPILER_RT_BUILD_CTX_PROFILE", "OFF"}, {"COMPILER_RT_BUILD_CTX_PROFILE", "OFF"},
@@ -99,19 +106,29 @@ func (t Toolchain) newEarlyRuntimes() (pkg.Artifact, string) {
Append: []string{"runtimes"}, Append: []string{"runtimes"},
Cache: []KV{ Cache: []KV{
{"ENABLE_LINKER_BUILD_ID", "ON"},
// libc++ not yet available // libc++ not yet available
{"CMAKE_CXX_COMPILER_WORKS", "ON"}, {"CMAKE_CXX_COMPILER_WORKS", "ON"},
{"LLVM_HOST_TRIPLE", `"${ROSA_TRIPLE}"`}, {"LLVM_HOST_TRIPLE", `"${ROSA_TRIPLE}"`},
{"LLVM_DEFAULT_TARGET_TRIPLE", `"${ROSA_TRIPLE}"`}, {"LLVM_DEFAULT_TARGET_TRIPLE", `"${ROSA_TRIPLE}"`},
{"LLVM_ENABLE_RTTI", "ON"},
{"LLVM_BUILD_LLVM_DYLIB", "ON"},
{"LLVM_LINK_LLVM_DYLIB", "ON"},
{"LLVM_ENABLE_RUNTIMES", "'libunwind;libcxx;libcxxabi'"}, {"LLVM_ENABLE_RUNTIMES", "'libunwind;libcxx;libcxxabi'"},
{"LIBUNWIND_ENABLE_ASSERTIONS", "OFF"},
{"LIBUNWIND_USE_COMPILER_RT", "ON"}, {"LIBUNWIND_USE_COMPILER_RT", "ON"},
{"LIBCXX_HAS_MUSL_LIBC", "ON"}, {"LIBCXX_HAS_MUSL_LIBC", "ON"},
{"LIBCXX_USE_COMPILER_RT", "ON"}, {"LIBCXX_USE_COMPILER_RT", "ON"},
{"LIBCXX_CXX_ABI", "libcxxabi"},
{"LIBCXX_ENABLE_STATIC_ABI_LIBRARY", "OFF"},
{"LIBCXX_HARDENING_MODE", "fast"},
{"LIBCXX_HAS_ATOMIC_LIB", "OFF"}, {"LIBCXX_HAS_ATOMIC_LIB", "OFF"},
{"LIBCXXABI_USE_COMPILER_RT", "ON"}, {"LIBCXXABI_USE_COMPILER_RT", "ON"},
{"LIBCXXABI_USE_LLVM_UNWINDER", "ON"}, {"LIBCXXABI_USE_LLVM_UNWINDER", "ON"},
{"LIBCXXABI_ENABLE_STATIC_UNWINDER", "OFF"},
{"LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL", "OFF"}, {"LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL", "OFF"},
{"LLVM_ENABLE_ZLIB", "FORCE_ON"}, {"LLVM_ENABLE_ZLIB", "FORCE_ON"},
@@ -144,11 +161,11 @@ func init() {
func (t Toolchain) newLLVM() (pkg.Artifact, string) { func (t Toolchain) newLLVM() (pkg.Artifact, string) {
var early PArtifact = muslHeaders var early PArtifact = muslHeaders
if t.isStage0() { if t.isStage0() {
// The LLVM build system is buggy around LLVM_LINK_LLVM_DYLIB and leaks // The LLVM build system uses the system installation when building with
// the system installation when invoking the newly built toolchain. This // LLVM_LINK_LLVM_DYLIB, since it builds runtimes after the fact, using
// is worked around in stage0 by providing standalone builds of // the just-built toolchain. This is unacceptable in stage0 due to the
// runtimes. Later stages rely on 3-stage determinism and allows the // potential version difference. Later stages bootstrap off of runtimes
// system installation from its previous stage to leak through. // of its previous stage via 3-stage determinism.
early = earlyRuntimes early = earlyRuntimes
} }