Skip to content

Commit e55d6a8

Browse files
authored
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
1 parent a78e82c commit e55d6a8

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
@@ -2143,6 +2143,7 @@ for host in "${ALL_HOSTS[@]}"; do
21432143
-DCMAKE_CXX_COMPILER:PATH="${CLANG_BIN}/clang++"
21442144
-DCMAKE_INSTALL_PREFIX:PATH="$(get_host_install_prefix ${host})"
21452145
-DCMAKE_Swift_COMPILER:PATH=${SWIFTC_BIN}
2146+
-DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\""
21462147

21472148
-DLLBUILD_ENABLE_ASSERTIONS:BOOL=$(true_false "${LLBUILD_ENABLE_ASSERTIONS}")
21482149
-DLLBUILD_SUPPORT_BINDINGS:=Swift
@@ -2215,6 +2216,7 @@ for host in "${ALL_HOSTS[@]}"; do
22152216
-DCMAKE_C_COMPILER:PATH="${CLANG_BIN}/clang"
22162217
-DCMAKE_CXX_COMPILER:PATH="${CLANG_BIN}/clang++"
22172218
-DCMAKE_Swift_COMPILER:PATH=${SWIFTC_BIN}
2219+
-DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\""
22182220
-DCMAKE_INSTALL_PREFIX:PATH="$(get_host_install_prefix ${host})"
22192221
-DCMAKE_INSTALL_LIBDIR:PATH="lib"
22202222

@@ -2283,6 +2285,7 @@ for host in "${ALL_HOSTS[@]}"; do
22832285
-DCMAKE_CXX_COMPILER:PATH=${CLANG_BIN}/clang++
22842286
-DCMAKE_SWIFT_COMPILER:PATH=${SWIFTC_BIN}
22852287
-DCMAKE_Swift_COMPILER:PATH=${SWIFTC_BIN}
2288+
-DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\""
22862289
-DCMAKE_INSTALL_PREFIX:PATH=$(get_host_install_prefix ${host})
22872290

22882291
${LIBICU_BUILD_ARGS[@]}

0 commit comments

Comments
 (0)