Skip to content

Commit b03288b

Browse files
committed
Work around Windows build failure due to SwiftPM regression.
Works around a link-time bug in SwiftPM that appears to have been introduced in swiftlang/swift-package-manager#8049.
1 parent 51805c4 commit b03288b

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

Package.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ extension Array where Element == PackageDescription.SwiftSetting {
128128
.enableExperimentalFeature("AccessLevelOnImport"),
129129
.enableUpcomingFeature("InternalImportsByDefault"),
130130

131+
.enableExperimentalFeature("SymbolLinkageMarkers"),
132+
131133
.define("SWT_TARGET_OS_APPLE", .when(platforms: [.macOS, .iOS, .macCatalyst, .watchOS, .tvOS, .visionOS])),
132134

133135
.define("SWT_NO_EXIT_TESTS", .when(platforms: [.iOS, .watchOS, .tvOS, .visionOS, .wasi, .android])),

Sources/Testing/ABI/EntryPoints/ABIEntryPoint.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ extension ABIv0 {
6060
///
6161
/// - Returns: The value of ``ABIv0/entryPoint-swift.type.property`` cast to an
6262
/// untyped pointer.
63+
#if hasFeature(SymbolLinkageMarkers)
64+
@_used
65+
#endif
6366
@_cdecl("swt_abiv0_getEntryPoint")
6467
@usableFromInline func abiv0_getEntryPoint() -> UnsafeRawPointer {
6568
unsafeBitCast(ABIv0.entryPoint, to: UnsafeRawPointer.self)
@@ -82,6 +85,9 @@ typealias ABIEntryPoint_v0 = @Sendable (
8285
/// Xcode 16 Beta 1.
8386
///
8487
/// This function will be removed in a future update.
88+
#if hasFeature(SymbolLinkageMarkers)
89+
@_used
90+
#endif
8591
@available(*, deprecated, message: "Use ABIv0.entryPoint (swt_abiv0_getEntryPoint()) instead.")
8692
@_cdecl("swt_copyABIEntryPoint_v0")
8793
@usableFromInline func copyABIEntryPoint_v0() -> UnsafeMutableRawPointer {

cmake/modules/shared/CompilerSettings.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ add_compile_options(
1515
add_compile_options(
1616
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-upcoming-feature -Xfrontend ExistentialAny>"
1717
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-upcoming-feature -Xfrontend InternalImportsByDefault>")
18+
add_compile_options(
19+
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend SymbolLinkageMarkers>")
1820
add_compile_options(
1921
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-package-name swift_testing>")
2022

0 commit comments

Comments
 (0)