From 0d1884ae102a736155aa4ff9721dffaea9e66d88 Mon Sep 17 00:00:00 2001 From: Bassam Khouri Date: Tue, 4 Nov 2025 15:29:10 -0500 Subject: [PATCH] Deprecate `--use-integrated-swift-driver` option The Native Build system supports a `--use-integrated-swift-driver` command line argument. The feature is not fully funtional. With the transition to SwiftBuild, mark this option as deprecated. Fixes: #9323 Issue: rdar://163962023 --- Sources/CoreCommands/Options.swift | 1 + Sources/CoreCommands/SwiftCommandState.swift | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Sources/CoreCommands/Options.swift b/Sources/CoreCommands/Options.swift index 8936f5c2c4e..6421ccf4c52 100644 --- a/Sources/CoreCommands/Options.swift +++ b/Sources/CoreCommands/Options.swift @@ -526,6 +526,7 @@ public struct BuildOptions: ParsableArguments { /// Whether to use the integrated Swift driver rather than shelling out /// to a separate process. @Flag() + /// This flag is deprecated but cannot indicate so in Swift Argument Parser until https://github.com/apple/swift-argument-parser/issues/656 public var useIntegratedSwiftDriver: Bool = false /// A flag that indicates this build should check whether targets only import diff --git a/Sources/CoreCommands/SwiftCommandState.swift b/Sources/CoreCommands/SwiftCommandState.swift index cdacee17668..c927160d89a 100644 --- a/Sources/CoreCommands/SwiftCommandState.swift +++ b/Sources/CoreCommands/SwiftCommandState.swift @@ -854,6 +854,11 @@ public final class SwiftCommandState { observabilityScope: ObservabilityScope? = .none, delegate: BuildSystemDelegate? = nil ) async throws -> BuildSystem { + + if self.options.build.useIntegratedSwiftDriver && self.options.build.buildSystem == .native { + self.observabilityScope.emit(warning: "`--use-integrated-swift-driver` option is deprecated as the feature is not fully functional.") + } + guard let buildSystemProvider else { fatalError("build system provider not initialized") }