Skip to content

Commit 7891d24

Browse files
committed
Pass compilerExecutableDir to libSwiftDriver even when using a library CompilerLocation.
libSwiftDriver requires this to be passed to properly find certain content, like the in-process plug-in library. This addresses <rdar://problem/147675593>.
1 parent ac0a1ce commit 7891d24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SWBCore/LibSwiftDriver/LibSwiftDriver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ public final class LibSwiftDriver {
511511
// Remove lib/swift/host/lib_InternalSwiftScan.dylib and add bin/swift-frontend to get a fake path to the compiler frontend.
512512
let fakeFrontendPath = path.dirname.dirname.dirname.dirname.join("bin/swift-frontend")
513513
env = environment.merging(["SWIFT_DRIVER_SWIFT_FRONTEND_EXEC": fakeFrontendPath.str, "SWIFT_DRIVER_SWIFTSCAN_LIB": path.str], uniquingKeysWith: { first, second in first })
514-
compilerExecutableDir = nil
514+
compilerExecutableDir = try TSCBasic.AbsolutePath(validating: fakeFrontendPath.dirname.str)
515515
}
516516
let key = SwiftModuleDependencyGraph.OracleRegistryKey(compilerLocation: compilerLocation, casOpts: casOptions)
517517
let oracle = graph?.oracleRegistry.getOrInsert(key, { InterModuleDependencyOracle() })

0 commit comments

Comments
 (0)