File tree Expand file tree Collapse file tree 2 files changed +3
-23
lines changed Expand file tree Collapse file tree 2 files changed +3
-23
lines changed Original file line number Diff line number Diff line change @@ -3610,8 +3610,8 @@ extension Driver {
3610
3610
// CAS and Caching.
3611
3611
extension Driver {
3612
3612
mutating func getCASPluginPath( ) throws -> AbsolutePath ? {
3613
- if let pluginOpt = parsedOptions. getLastArgument ( . casPluginOption ) ? . asSingle {
3614
- return try AbsolutePath ( validating: pluginOpt . description)
3613
+ if let pluginPath = parsedOptions. getLastArgument ( . casPluginPath ) ? . asSingle {
3614
+ return try AbsolutePath ( validating: pluginPath . description)
3615
3615
}
3616
3616
return try toolchain. lookupToolchainCASPluginLib ( )
3617
3617
}
Original file line number Diff line number Diff line change @@ -287,33 +287,13 @@ extension Toolchain {
287
287
#endif
288
288
}
289
289
290
- /// Looks for the executable in the `SWIFT_DRIVER_TOOLCHAIN_CASPLUGIN_LIB` environment variable, if found nothing,
291
- /// looks in the `lib` relative to the compiler executable.
290
+ /// Looks for the executable in the `SWIFT_DRIVER_TOOLCHAIN_CASPLUGIN_LIB` environment variable.
292
291
@_spi ( Testing) public func lookupToolchainCASPluginLib( ) throws -> AbsolutePath ? {
293
292
if let overrideString = env [ " SWIFT_DRIVER_TOOLCHAIN_CASPLUGIN_LIB " ] ,
294
293
let path = try ? AbsolutePath ( validating: overrideString) {
295
294
return path
296
295
}
297
- #if os(Windows)
298
- return nil
299
- #else
300
- // Try to look for libToolchainCASPlugin in the developer dir, if found,
301
- // prefer using that. Otherwise, just return nil, and auto fallback to
302
- // builtin CAS.
303
- let libraryName = sharedLibraryName ( " libToolchainCASPlugin " )
304
- let compilerPath = try getToolPath ( . swiftCompiler)
305
- let developerPath = compilerPath. parentDirectory // bin
306
- . parentDirectory // toolchain root
307
- . parentDirectory // toolchains
308
- . parentDirectory // developer
309
- let libraryPath = developerPath. appending ( component: " usr " )
310
- . appending ( component: " lib " )
311
- . appending ( component: libraryName)
312
- if fileSystem. isFile ( libraryPath) {
313
- return libraryPath
314
- }
315
296
return nil
316
- #endif
317
297
}
318
298
319
299
private func xcrunFind( executable: String ) throws -> AbsolutePath {
You can’t perform that action at this time.
0 commit comments