Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions Sources/SwiftDriver/Jobs/EmitSupportedFeaturesJob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,16 @@ extension Driver {
fileSystem: FileSystem,
executor: DriverExecutor)
throws -> Set<String> {
do {
if let supportedArgs =
try querySupportedCompilerArgsInProcess(of: toolchain, fileSystem: fileSystem) {
return supportedArgs
}
} catch {
diagnosticsEngine.emit(.remark_inprocess_supported_features_query_failed(error.localizedDescription))
}
// Disable in-process supported features query due to a race condition in the compiler's current
// build system where libSwiftScan may not be ready when building the Swift standard library.
// do {
// if let supportedArgs =
// try querySupportedCompilerArgsInProcess(of: toolchain, fileSystem: fileSystem) {
// return supportedArgs
// }
// } catch {
// diagnosticsEngine.emit(.remark_inprocess_supported_features_query_failed(error.localizedDescription))
// }

// Fallback: Invoke `swift-frontend -emit-supported-features` and decode the output
let frontendOverride = try FrontendOverride(&parsedOptions, diagnosticsEngine)
Expand Down
22 changes: 12 additions & 10 deletions Sources/SwiftDriver/Jobs/PrintTargetInfoJob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,18 @@ extension Driver {
using: executor.resolver)
Self.sanitizeCommandForLibScanInvocation(&command)

do {
if let targetInfo =
try Self.queryTargetInfoInProcess(of: toolchain, fileSystem: fileSystem,
workingDirectory: workingDirectory,
invocationCommand: command) {
return targetInfo
}
} catch {
diagnosticsEngine.emit(.remark_inprocess_target_info_query_failed(error.localizedDescription))
}
// Disable in-process target query due to a race condition in the compiler's current
// build system where libSwiftScan may not be ready when building the Swift standard library.
// do {
// if let targetInfo =
// try Self.queryTargetInfoInProcess(of: toolchain, fileSystem: fileSystem,
// workingDirectory: workingDirectory,
// invocationCommand: command) {
// return targetInfo
// }
// } catch {
// diagnosticsEngine.emit(.remark_inprocess_target_info_query_failed(error.localizedDescription))
// }

// Fallback: Invoke `swift-frontend -print-target-info` and decode the output
return try executor.execute(
Expand Down