Skip to content

Commit 25b42b5

Browse files
committed
[Stdlib] Move SwiftNativeNSObject to libswiftCore.
This type can be put to good use outside of the concurrency runtime. Reexport it from libswift_Concurrency so it can still be found there as well. rdar://79352061
1 parent 6362a98 commit 25b42b5

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

stdlib/public/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set(SWIFT_RUNTIME_CXX_FLAGS)
44
set(SWIFT_RUNTIME_LINK_FLAGS)
55
set(SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS)
66
set(SWIFT_RUNTIME_SWIFT_LINK_FLAGS)
7+
set(SWIFT_RUNTIME_CONCURRENCY_SWIFT_LINK_FLAGS)
78

89
if(SWIFT_RUNTIME_USE_SANITIZERS)
910
# TODO: Refactor this
@@ -121,3 +122,9 @@ if(SWIFT_BUILD_SDK_OVERLAY)
121122
endif()
122123
endif()
123124

125+
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
126+
list(APPEND SWIFT_RUNTIME_CONCURRENCY_SWIFT_LINK_FLAGS
127+
"-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/Concurrency/ReexportedSymbols")
128+
endif()
129+
130+
list(APPEND SWIFT_RUNTIME_CONCURRENCY_SWIFT_LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}")

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
#
1111
#===----------------------------------------------------------------------===#
1212

13-
set(swift_concurrency_objc_sources
14-
SwiftNativeNSObject.mm)
15-
1613
set(LLVM_OPTIONAL_SOURCES
1714
${swift_concurrency_objc_sources})
1815

@@ -97,6 +94,6 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
9794
-Xfrontend -enable-experimental-concurrency
9895
-Xfrontend -define-availability
9996
-Xfrontend \"SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0\"
100-
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
97+
LINK_FLAGS "${SWIFT_RUNTIME_CONCURRENCY_SWIFT_LINK_FLAGS}"
10198
INSTALL_IN_COMPONENT stdlib
10299
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_OBJC_CLASS_$_SwiftNativeNSObject
2+
_OBJC_METACLASS_$_SwiftNativeNSObject

stdlib/public/stubs/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ set(swift_stubs_objc_sources
1313
FoundationHelpers.mm
1414
OptionalBridgingHelper.mm
1515
Reflection.mm
16+
SwiftNativeNSObject.mm
1617
SwiftNativeNSXXXBaseARC.m)
1718
set(swift_stubs_gyb_sources
1819
SwiftNativeNSXXXBase.mm.gyb)

0 commit comments

Comments
 (0)