File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ public final class UserToolchain: Toolchain {
218
218
if let SDKROOT = ProcessEnv . vars [ " SDKROOT " ] , let root = try ? AbsolutePath ( validating: SDKROOT) {
219
219
var runtime : [ String ] = [ ]
220
220
var xctest : [ String ] = [ ]
221
+ var extraSwiftCFlags : [ String ] = [ ]
221
222
222
223
if let settings = WindowsSDKSettings ( reading: root. appending ( component: " SDKSettings.plist " ) ,
223
224
diagnostics: nil , filesystem: localFileSystem) {
@@ -247,10 +248,12 @@ public final class UserToolchain: Toolchain {
247
248
" -I " , path. appending ( RelativePath ( " usr/lib/swift/windows/ \( triple. arch) " ) ) . pathString,
248
249
" -L " , path. appending ( RelativePath ( " usr/lib/swift/windows " ) ) . pathString,
249
250
]
251
+
252
+ extraSwiftCFlags = info. defaults. extraSwiftCFlags ?? [ ]
250
253
}
251
254
}
252
255
253
- return [ " -sdk " , root. pathString, ] + runtime + xctest
256
+ return [ " -sdk " , root. pathString, ] + runtime + xctest + extraSwiftCFlags
254
257
}
255
258
}
256
259
Original file line number Diff line number Diff line change @@ -74,6 +74,10 @@ public struct WindowsPlatformInfo {
74
74
/// XCTEST_VERSION
75
75
/// specifies the version string of the bundled XCTest.
76
76
public let xctestVersion : String
77
+
78
+ /// SWIFTC_FLAGS
79
+ /// Specifies extra flags to pass to swiftc from Swift Package Manager.
80
+ public let extraSwiftCFlags : [ String ] ?
77
81
}
78
82
79
83
public let defaults : DefaultProperties
@@ -82,6 +86,7 @@ public struct WindowsPlatformInfo {
82
86
extension WindowsPlatformInfo . DefaultProperties : Decodable {
83
87
enum CodingKeys : String , CodingKey {
84
88
case xctestVersion = " XCTEST_VERSION "
89
+ case extraSwiftCFlags = " SWIFTC_FLAGS "
85
90
}
86
91
}
87
92
You can’t perform that action at this time.
0 commit comments