Skip to content

Commit 2df58da

Browse files
authored
Merge pull request #503 from artemcm/OptinSwiftScanFeatureQuery
Default to swift-frontend for querying supported frontend flags
2 parents a598bd8 + 42330b4 commit 2df58da

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

Sources/SwiftDriver/Jobs/EmitSupportedFeaturesJob.swift

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,20 @@ extension Driver {
5757
fileSystem: FileSystem,
5858
executor: DriverExecutor, env: [String: String])
5959
throws -> Set<String> {
60-
// If libSwiftScan library is present, use it to query
61-
let swiftScanLibPath = try Self.getScanLibPath(of: toolchain,
62-
hostTriple: hostTriple,
63-
env: env)
64-
65-
if fileSystem.exists(swiftScanLibPath) {
66-
let libSwiftScanInstance = try SwiftScan(dylib: swiftScanLibPath)
67-
if libSwiftScanInstance.canQuerySupportedArguments() {
68-
return try libSwiftScanInstance.querySupportedArguments()
69-
}
70-
}
60+
// TODO: Once we are sure libSwiftScan is deployed across supported platforms and architectures
61+
// we should deploy it here.
62+
// let swiftScanLibPath = try Self.getScanLibPath(of: toolchain,
63+
// hostTriple: hostTriple,
64+
// env: env)
65+
//
66+
// if fileSystem.exists(swiftScanLibPath) {
67+
// let libSwiftScanInstance = try SwiftScan(dylib: swiftScanLibPath)
68+
// if libSwiftScanInstance.canQuerySupportedArguments() {
69+
// return try libSwiftScanInstance.querySupportedArguments()
70+
// }
71+
// }
7172

72-
// Fallback to invoking `swift-frontend -emit-supported-features`
73+
// Invoke `swift-frontend -emit-supported-features`
7374
let frontendOverride = try FrontendOverride(&parsedOptions, diagnosticsEngine)
7475
frontendOverride.setUpForTargetInfo(toolchain)
7576
defer { frontendOverride.setUpForCompilation(toolchain) }

0 commit comments

Comments
 (0)