mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This is meant to support scenarios in which we need to build as little as LLVM as possible for performance reasons (e.g. when enabling LTO). While LLVM CMake build system offers options in this sense, in our investigation they turned out not to be suitable, since either they are not granular enough (`LLVM_INCLUDE/BUILD` flags) or they require active opt out for any new tool added (`*_BUILD_*_TOOL` flags) When using this mechanism, there is the possibility to specify different targets to use for cross-compile hosts. Supports rdar://32019390
48 lines
2.4 KiB
Plaintext
48 lines
2.4 KiB
Plaintext
# REQUIRES: standalone_build
|
|
|
|
# RUN: %empty-directory(%t)
|
|
# RUN: mkdir -p %t
|
|
# RUN: SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --build-llvm=0 --cmake %cmake 2>&1 | %FileCheck --check-prefix=BUILD-LLVM-0-CHECK %s
|
|
|
|
# RUN: %empty-directory(%t)
|
|
# RUN: mkdir -p %t
|
|
# RUN: SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --build-llvm=0 --llvm-ninja-targets="lib/all clangDependencyScanning" --cmake %cmake 2>&1 | %FileCheck --check-prefix=BUILD-LLVM-0-CHECK %s
|
|
|
|
# BUILD-LLVM-0-CHECK: cmake --build {{.*}}/llvm-{{[^/]*}} clean
|
|
|
|
|
|
# RUN: %empty-directory(%t)
|
|
# RUN: mkdir -p %t
|
|
# RUN: SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --cmake %cmake 2>&1 | %FileCheck --check-prefix=SKIP-BUILD-CHECK %s
|
|
|
|
# RUN: %empty-directory(%t)
|
|
# RUN: mkdir -p %t
|
|
# RUN: SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --llvm-ninja-targets="lib/all bin/clang" --cmake %cmake 2>&1 | %FileCheck --check-prefix=SKIP-BUILD-CHECK %s
|
|
|
|
# RUN: %empty-directory(%t)
|
|
# RUN: mkdir -p %t
|
|
# RUN: SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build-llvm --cmake %cmake 2>&1 | %FileCheck --check-prefix=SKIP-BUILD-CHECK %s
|
|
|
|
# RUN: %empty-directory(%t)
|
|
# RUN: mkdir -p %t
|
|
# RUN: SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build-llvm --llvm-ninja-targets="bin/clang clangDependencyScanning" --cmake %cmake 2>&1 | %FileCheck --check-prefix=SKIP-BUILD-CHECK %s
|
|
|
|
# SKIP-BUILD-CHECK: cmake --build {{.*}}/llvm-{{[^/]*}} llvm-tblgen clang-resource-headers intrinsics_gen clang-tablegen-targets
|
|
# SKIP-BUILD-CHECK-SAME: FileCheck not llvm-nm
|
|
|
|
|
|
# RUN: %empty-directory(%t)
|
|
# RUN: mkdir -p %t
|
|
# RUN: SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build-llvm --build-toolchain-only=1 --cmake %cmake 2>&1 | %FileCheck --check-prefix=SKIP-BUILD-LLVM-BUILD-TOOLCHAIN-ONLY-CHECK %s
|
|
|
|
# SKIP-BUILD-LLVM-BUILD-TOOLCHAIN-ONLY-CHECK: cmake --build {{.*}}/llvm-{{[^/]*}} llvm-tblgen clang-resource-headers intrinsics_gen clang-tablegen-targets
|
|
# SKIP-BUILD-LLVM-BUILD-TOOLCHAIN-ONLY-CHECK-NOT: FileCheck not llvm-nm
|
|
|
|
|
|
# RUN: %empty-directory(%t)
|
|
# RUN: mkdir -p %t
|
|
# RUN: SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --llvm-ninja-targets="lib/all clangDependencyScanning" --cmake %cmake 2>&1 | %FileCheck --check-prefix=LLVM-NINJA-TARGETS-CHECK %s
|
|
|
|
# LLVM-NINJA-TARGETS-CHECK: cmake --build {{.*}}/llvm-{{[^/]*}} lib/all clangDependencyScanning
|
|
|