Skip to content

Commit ddb749a

Browse files
authored
Avoid calling supportedFrontendFlags on Windows (#3521)
The new driver does not support Windows, yet, so the check for `supportedFrontendFlags` needs to be conditional to non-Windows.
1 parent b0e0388 commit ddb749a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/Build/BuildPlan.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,13 +693,18 @@ public final class SwiftTargetBuildDescription {
693693
}
694694

695695
public static func checkSupportedFrontendFlags(flags: Set<String>, fs: FileSystem) -> Bool {
696+
// The new driver is not supported on Windows, yet, so we should avoid calling into it there.
697+
#if os(Windows)
698+
return false
699+
#else
696700
do {
697701
let executor = try SPMSwiftDriverExecutor(resolver: ArgsResolver(fileSystem: fs), fileSystem: fs, env: [:])
698702
let driver = try Driver(args: ["swiftc"], executor: executor)
699703
return driver.supportedFrontendFlags.intersection(flags) == flags
700704
} catch {
701705
return false
702706
}
707+
#endif
703708
}
704709

705710
/// The arguments needed to compile this target.

0 commit comments

Comments
 (0)