File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Sources/SwiftDriver/Toolchains Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,13 @@ extension Toolchain {
128128 return path
129129 } else if let path = try ? xcrunFind ( executable: executable) {
130130 return path
131+ } else if ![ " swift-frontend " , " swift " ] . contains ( executable) ,
132+ let parentDirectory = try ? getToolPath ( . swiftCompiler) . parentDirectory,
133+ parentDirectory != executableDir,
134+ let path = lookupExecutablePath ( filename: executable, searchPaths: [ parentDirectory] ) {
135+ // If the driver library's client and the frontend are in different directories,
136+ // try looking for tools next to the frontend.
137+ return path
131138 } else if let path = lookupExecutablePath ( filename: executable, searchPaths: searchPaths) {
132139 return path
133140 } else if executable == " swift-frontend " {
You can’t perform that action at this time.
0 commit comments