Skip to content

Commit 64e33c5

Browse files
committed
Use dedicated module cache to build xctest, llbuild and Foundation (#34728)
This is a small step to ensure multiple build jobs running on the same machine (e.g. in CI) do not stomp on each other. This PR does not cover the version detection of the Swift compiler during the CMake configuration -- in there the compiler gets called once without any of the `CMAKE_Swift_FLAGS`. Addresses rdar://71373494 (cherry picked from commit e55d6a8)
1 parent 3ee5411 commit 64e33c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

utils/build-script-impl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,6 +2075,7 @@ for host in "${ALL_HOSTS[@]}"; do
20752075
-DCMAKE_BUILD_TYPE:STRING="${LLBUILD_BUILD_TYPE}"
20762076
-DCMAKE_INSTALL_PREFIX:PATH="$(get_host_install_prefix ${host})"
20772077
-DCMAKE_Swift_COMPILER:PATH="$(build_directory_bin ${LOCAL_HOST} swift)/swiftc"
2078+
-DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\""
20782079

20792080
-DLLBUILD_ENABLE_ASSERTIONS:BOOL=$(true_false "${LLBUILD_ENABLE_ASSERTIONS}")
20802081
-DLLBUILD_SUPPORT_BINDINGS:=Swift
@@ -2151,6 +2152,7 @@ for host in "${ALL_HOSTS[@]}"; do
21512152
-DCMAKE_C_COMPILER:PATH="${LLVM_BIN}/clang"
21522153
-DCMAKE_CXX_COMPILER:PATH="${LLVM_BIN}/clang++"
21532154
-DCMAKE_Swift_COMPILER:PATH="$(build_directory_bin ${LOCAL_HOST} swift)/swiftc"
2155+
-DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\""
21542156
-DCMAKE_INSTALL_PREFIX:PATH="$(get_host_install_prefix ${host})"
21552157
-DCMAKE_INSTALL_LIBDIR:PATH="lib"
21562158

@@ -2222,6 +2224,7 @@ for host in "${ALL_HOSTS[@]}"; do
22222224
-DCMAKE_CXX_COMPILER:PATH=${LLVM_BIN}/clang++
22232225
-DCMAKE_SWIFT_COMPILER:PATH=${SWIFTC_BIN}
22242226
-DCMAKE_Swift_COMPILER:PATH=${SWIFTC_BIN}
2227+
-DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\""
22252228
-DCMAKE_INSTALL_PREFIX:PATH=$(get_host_install_prefix ${host})
22262229

22272230
${LIBICU_BUILD_ARGS[@]}

0 commit comments

Comments
 (0)