Skip to content

Commit 4ef4305

Browse files
committed
[Concurrency] Install ExecutorImpl.h in include/swift in toolchain.
When Embedded Concurrency is enabled, install `ExecutorImpl.h` in the `include/swift` directory in the toolchain. rdar://135380149
1 parent 26b5fa6 commit 4ef4305

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,4 +319,25 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB AND SWIFT_SHOULD_BUILD_EMBEDDED_CONCURRENC
319319

320320
add_dependencies(embedded-concurrency embedded-concurrency-${mod})
321321
endforeach()
322+
323+
# Copy the ExecutorImpl.h header into the local include directory
324+
# and install it in the compiler toolchain
325+
add_custom_command(
326+
OUTPUT "${SWIFT_INCLUDE_DIR}/swift/ExecutorImpl.h"
327+
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/ExecutorImpl.h"
328+
COMMAND "${CMAKE_COMMAND}" "-E" "copy"
329+
"${CMAKE_CURRENT_SOURCE_DIR}/ExecutorImpl.h"
330+
"${SWIFT_INCLUDE_DIR}/swift")
331+
332+
add_custom_target("copy_executor_impl_header"
333+
DEPENDS "${SWIFT_INCLUDE_DIR}/swift/ExecutorImpl.h"
334+
COMMENT "Copying executor implementation header to ${SWIFT_INCLUDE_DIR}/swift")
335+
336+
swift_install_in_component(FILES
337+
"${CMAKE_CURRENT_SOURCE_DIR}/ExecutorImpl.h"
338+
DESTINATION "include/swift"
339+
COMPONENT compiler)
340+
341+
add_dependencies(embedded-concurrency "copy_executor_impl_header")
322342
endif()
343+

0 commit comments

Comments
 (0)