Skip to content

Commit 33684ba

Browse files
committed
Add support for compiling ObjectiveCNoBridgingStubs to the swiftpm benchmark build.
We did not have access to something like SwiftSettings.unsafeFlags to pass -disable-swift-bridge-attr to swift.
1 parent d2e1f09 commit 33684ba

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

benchmark/Package.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import PackageDescription
44
import Foundation
55

6-
var unsupportedTests: Set<String> = ["ObjectiveCNoBridgingStubs"]
6+
var unsupportedTests: Set<String> = []
77
#if !os(macOS) && !os(iOS) && !os(watchOS) && !os(tvOS)
8+
unsupportedTests.insert("ObjectiveCNoBridgingStubs")
89
unsupportedTests.insert("ObjectiveCBridging")
910
unsupportedTests.insert("ObjectiveCBridgingStubs")
1011
#endif
@@ -123,6 +124,15 @@ singleSourceDeps.append(.target(name: "ObjectiveCTests"))
123124
#endif
124125

125126
targets += singleSourceLibraries.map { name in
127+
if name == "ObjectiveCNoBridgingStubs" {
128+
return .target(
129+
name: name,
130+
dependencies: singleSourceDeps,
131+
path: "single-source",
132+
sources: ["\(name).swift"],
133+
swiftSettings: [.unsafeFlags(["-Xfrontend",
134+
"-disable-swift-bridge-attr"])])
135+
}
126136
return .target(name: name,
127137
dependencies: singleSourceDeps,
128138
path: "single-source",

0 commit comments

Comments
 (0)