Skip to content

Commit 0b0025d

Browse files
authored
Merge pull request #34965 from compnerd/dependencies
build: correct dependencies for a unified build
2 parents ad55fd1 + 3add677 commit 0b0025d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

stdlib/private/BlocksRuntimeStubs/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ foreach(SDK ${SWIFT_SDKS})
2525
LIBRARY_OUTPUT_DIRECTORY ${test_bin_dir}
2626
RUNTIME_OUTPUT_DIRECTORY ${test_bin_dir}
2727
OUTPUT_NAME BlocksRuntime)
28+
29+
# When built in a unified build, ensure that we add a dependency on the
30+
# compiler to serialize this behind the compiler. Otherwise, we would
31+
# attempt to build this before the compiler is ready, which breaks the
32+
# build.
33+
if(NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER AND NOT BUILD_STANDALONE AND
34+
TARGET clang)
35+
add_dependencies(BlocksRuntimeStub${VARIANT_SUFFIX} clang)
36+
endif()
2837
endforeach()
2938
endforeach()
3039
endforeach()

0 commit comments

Comments
 (0)