Skip to content

Commit 3057fc6

Browse files
committed
Use dedicated module cache to build xctest, llbuild and Foundation
This is a small tests 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 f58c143 commit 3057fc6

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
@@ -2138,6 +2138,7 @@ for host in "${ALL_HOSTS[@]}"; do
21382138
-DCMAKE_CXX_COMPILER:PATH="${CLANG_BIN}/clang++"
21392139
-DCMAKE_INSTALL_PREFIX:PATH="$(get_host_install_prefix ${host})"
21402140
-DCMAKE_Swift_COMPILER:PATH=${SWIFTC_BIN}
2141+
-DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\""
21412142

21422143
-DLLBUILD_ENABLE_ASSERTIONS:BOOL=$(true_false "${LLBUILD_ENABLE_ASSERTIONS}")
21432144
-DLLBUILD_SUPPORT_BINDINGS:=Swift
@@ -2210,6 +2211,7 @@ for host in "${ALL_HOSTS[@]}"; do
22102211
-DCMAKE_C_COMPILER:PATH="${CLANG_BIN}/clang"
22112212
-DCMAKE_CXX_COMPILER:PATH="${CLANG_BIN}/clang++"
22122213
-DCMAKE_Swift_COMPILER:PATH=${SWIFTC_BIN}
2214+
-DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\""
22132215
-DCMAKE_INSTALL_PREFIX:PATH="$(get_host_install_prefix ${host})"
22142216
-DCMAKE_INSTALL_LIBDIR:PATH="lib"
22152217

@@ -2278,6 +2280,7 @@ for host in "${ALL_HOSTS[@]}"; do
22782280
-DCMAKE_CXX_COMPILER:PATH=${CLANG_BIN}/clang++
22792281
-DCMAKE_SWIFT_COMPILER:PATH=${SWIFTC_BIN}
22802282
-DCMAKE_Swift_COMPILER:PATH=${SWIFTC_BIN}
2283+
-DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\""
22812284
-DCMAKE_INSTALL_PREFIX:PATH=$(get_host_install_prefix ${host})
22822285

22832286
${LIBICU_BUILD_ARGS[@]}

0 commit comments

Comments
 (0)