@@ -353,6 +353,7 @@ public struct Driver {
353353 fileSystem: FileSystem = localFileSystem,
354354 executor: DriverExecutor ,
355355 integratedDriver: Bool = true ,
356+ compilerExecutableDir: AbsolutePath ? = nil ,
356357 // FIXME: Duplication with externalBuildArtifacts and externalTargetModulePathMap
357358 // is a temporary backwards-compatibility shim to help transition SwiftPM to the new API
358359 externalBuildArtifacts: ExternalBuildArtifacts ? = nil ,
@@ -415,7 +416,8 @@ public struct Driver {
415416 & self . parsedOptions, diagnosticsEngine: diagnosticEngine,
416417 compilerMode: self . compilerMode, env: env,
417418 executor: self . executor, fileSystem: fileSystem,
418- useStaticResourceDir: self . useStaticResourceDir)
419+ useStaticResourceDir: self . useStaticResourceDir,
420+ compilerExecutableDir: compilerExecutableDir)
419421
420422 // Compute the host machine's triple
421423 self . hostTriple =
@@ -2180,7 +2182,8 @@ extension Driver {
21802182 env: [ String : String ] ,
21812183 executor: DriverExecutor ,
21822184 fileSystem: FileSystem ,
2183- useStaticResourceDir: Bool
2185+ useStaticResourceDir: Bool ,
2186+ compilerExecutableDir: AbsolutePath ?
21842187 ) throws -> ( Toolchain , FrontendTargetInfo , [ String ] ) {
21852188 let explicitTarget = ( parsedOptions. getLastArgument ( . target) ? . asSingle)
21862189 . map {
@@ -2208,6 +2211,7 @@ extension Driver {
22082211 }
22092212 let toolchain = toolchainType. init ( env: env, executor: executor,
22102213 fileSystem: fileSystem,
2214+ compilerExecutableDir: compilerExecutableDir,
22112215 toolDirectory: toolDir)
22122216
22132217 let frontendOverride = try FrontendOverride ( & parsedOptions, diagnosticsEngine)
0 commit comments