From 3ee5411a1cdd68a35e4613cd8493e4e4eb47a1d6 Mon Sep 17 00:00:00 2001 From: Eric Miotto <1094986+edymtt@users.noreply.github.com> Date: Tue, 10 Nov 2020 07:06:34 -0800 Subject: [PATCH 1/2] Build libdispatch with its own module cache (#34638) Some of the bots in CI run multiple jobs, so we need to be sure libdispatch compilations do not attempt to share the module cache. Addresses rdar://68100533 (cherry picked from commit f4b86c94a079dd02f1a5066b25119d91ce317b3d) --- utils/build-script-impl | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/build-script-impl b/utils/build-script-impl index c5cc228b494be..ecde531682912 100755 --- a/utils/build-script-impl +++ b/utils/build-script-impl @@ -2265,6 +2265,7 @@ for host in "${ALL_HOSTS[@]}"; do -DCMAKE_CXX_COMPILER:PATH="${LLVM_BIN}/clang++" -DCMAKE_SWIFT_COMPILER:PATH="${SWIFTC_BIN}" -DCMAKE_Swift_COMPILER:PATH="${SWIFTC_BIN}" + -DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\"" -DCMAKE_INSTALL_PREFIX:PATH="$(get_host_install_prefix ${host})" -DCMAKE_INSTALL_LIBDIR:PATH="lib" From 64e33c5bb48197eb0a5fb92cb87c218470cc7808 Mon Sep 17 00:00:00 2001 From: Eric Miotto <1094986+edymtt@users.noreply.github.com> Date: Fri, 13 Nov 2020 14:47:00 -0800 Subject: [PATCH 2/2] 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 e55d6a80e8c3d8a4a5ed3df8db67fdc55cbb5e50) --- utils/build-script-impl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/build-script-impl b/utils/build-script-impl index ecde531682912..fda51162cfe89 100755 --- a/utils/build-script-impl +++ b/utils/build-script-impl @@ -2075,6 +2075,7 @@ for host in "${ALL_HOSTS[@]}"; do -DCMAKE_BUILD_TYPE:STRING="${LLBUILD_BUILD_TYPE}" -DCMAKE_INSTALL_PREFIX:PATH="$(get_host_install_prefix ${host})" -DCMAKE_Swift_COMPILER:PATH="$(build_directory_bin ${LOCAL_HOST} swift)/swiftc" + -DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\"" -DLLBUILD_ENABLE_ASSERTIONS:BOOL=$(true_false "${LLBUILD_ENABLE_ASSERTIONS}") -DLLBUILD_SUPPORT_BINDINGS:=Swift @@ -2151,6 +2152,7 @@ for host in "${ALL_HOSTS[@]}"; do -DCMAKE_C_COMPILER:PATH="${LLVM_BIN}/clang" -DCMAKE_CXX_COMPILER:PATH="${LLVM_BIN}/clang++" -DCMAKE_Swift_COMPILER:PATH="$(build_directory_bin ${LOCAL_HOST} swift)/swiftc" + -DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\"" -DCMAKE_INSTALL_PREFIX:PATH="$(get_host_install_prefix ${host})" -DCMAKE_INSTALL_LIBDIR:PATH="lib" @@ -2222,6 +2224,7 @@ for host in "${ALL_HOSTS[@]}"; do -DCMAKE_CXX_COMPILER:PATH=${LLVM_BIN}/clang++ -DCMAKE_SWIFT_COMPILER:PATH=${SWIFTC_BIN} -DCMAKE_Swift_COMPILER:PATH=${SWIFTC_BIN} + -DCMAKE_Swift_FLAGS:STRING="-module-cache-path \"${module_cache}\"" -DCMAKE_INSTALL_PREFIX:PATH=$(get_host_install_prefix ${host}) ${LIBICU_BUILD_ARGS[@]}