Skip to content

Commit 42e1610

Browse files
committed
Switch to the appropriate C calling convention for pthread_main_np
1 parent a621292 commit 42e1610

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Runtimes/Core/Concurrency/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ target_compile_options(swift_Concurrency PRIVATE
112112
# NOTE: do not remove until `IsolatedAny` is on by default in all supported
113113
# compilers.
114114
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature IsolatedAny>"
115+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature Extern>"
115116
# NOTE: enable the async frame pointer on Darwin to faciliate debugging.
116117
$<$<AND:$<PLATFORM_ID:Darwin>,$<COMPILE_LANGUAGE:C,CXX>>:-fswift-async-fp=always>
117118
"$<$<AND:$<PLATFORM_ID:Darwin>,$<COMPILE_LANGUAGE:Swift>>:SHELL:-Xfrontend -swift-async-frame-pointer=always>"

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ list(APPEND SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS
6868
list(APPEND SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS "-strict-memory-safety")
6969
list(APPEND SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS "-enable-experimental-feature" "AllowUnsafeAttribute")
7070

71+
list(APPEND SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS "-enable-experimental-feature" "Extern")
72+
7173
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS
7274
"-D__STDC_WANT_LIB_EXT1__=1")
7375

stdlib/public/Concurrency/MainActor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ extension MainActor {
166166

167167

168168
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
169-
@_silgen_name("pthread_main_np")
169+
@_extern(c, "pthread_main_np")
170170
@usableFromInline
171171
internal func pthread_main_np() -> CInt
172172

0 commit comments

Comments
 (0)