Skip to content

Commit 8624643

Browse files
committed
when building the swift libs, do not automatically import _Concurrency
This fixes issues when building Swift with concurrency enabled by default. See rdar://71045297 If some of our overlays need to use the concurrency API, they can manually import _Concurrency.
1 parent 242e9fe commit 8624643

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stdlib/cmake/modules/AddSwiftStdlib.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,6 +1657,12 @@ function(add_swift_target_library name)
16571657
list(APPEND SWIFTLIB_DEPENDS clang)
16581658
endif()
16591659

1660+
# Turn off implicit import of _Concurrency when building libraries
1661+
if(SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY)
1662+
list(APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS
1663+
"-Xfrontend;-disable-implicit-concurrency-module-import")
1664+
endif()
1665+
16601666
# If we are building this library for targets, loop through the various
16611667
# SDKs building the variants of this library.
16621668
list_intersect(

0 commit comments

Comments
 (0)