mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
LLVM-21 plans to remove the legacy method for building compiler-rt in the same invocation as LLVM using `LLVM_ENABLED_PROJECTS` and `LLVM_BUILD_EXTERNAL_COMPILER_RT`. Support the new way of building compiler-rt with a new build-script opt-in flag `--llvm-build-compiler-rt-with-use-runtimes` -- this will allow a staged introduction, and will ensure we can revert back to the old behaviour temporarily in case of unforeseen regression. Since this flag is meant to be short lived, in an attempt to keep the logic simple we are gating on it only the CMake cache entries that strictly control the compilation mode, all the other entries used for configuring are added in both modes. Take this chance to remove some stale code from `build-script-impl`, and move some code in the generic CMake product to the LLVM one. Addresses rdar://147505298
18 lines
1.2 KiB
Plaintext
18 lines
1.2 KiB
Plaintext
# REQUIRES: standalone_build
|
|
# REQUIRES: OS=linux-gnu
|
|
|
|
# RUN: %empty-directory(%t)
|
|
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --llvm-build-compiler-rt-with-use-runtimes --cmake %cmake 2>&1 | %FileCheck --check-prefix=LINUX %s
|
|
# RUN: %empty-directory(%t)
|
|
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --llvm-build-compiler-rt-with-use-runtimes=1 --cmake %cmake 2>&1 | %FileCheck --check-prefix=LINUX %s
|
|
# RUN: %empty-directory(%t)
|
|
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --cmake %cmake 2>&1 | %FileCheck --check-prefix=LINUX %s
|
|
# RUN: %empty-directory(%t)
|
|
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --llvm-build-compiler-rt-with-use-runtimes=0 --cmake %cmake 2>&1 | %FileCheck --check-prefix=LINUX %s
|
|
|
|
# LINUX: Building llvm
|
|
# LINUX-DAG: cmake -G Ninja
|
|
# LINUX-SAME: -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR{{[^ ]*}}=OFF
|
|
# LINUX-SAME: -DSANITIZER_COMMON_LINK_FLAGS{{[^ ]*}}=-Wl,-z,undefs
|
|
# LINUX-SAME: llvm
|