Skip to content

Commit 7dfca5a

Browse files
committed
Use .app to detect Xcode toolchains rather than .xctoolchain
Open Source macOS toolchains also use the .xctoolchain suffix, so this isn't the right way to detect Xcode toolchains specifically.
1 parent b7fb958 commit 7dfca5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftBuildSupport/SwiftBuildSystem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public func createSession(
6666
packageManagerResourcesDirectory: Basics.AbsolutePath?
6767
) async throws-> (SWBBuildServiceSession, [SwiftBuildMessage.DiagnosticInfo]) {
6868
// SWIFT_EXEC and SWIFT_EXEC_MANIFEST may need to be overridden in debug scenarios in order to pick up Open Source toolchains
69-
let sessionResult = if toolchainPath.components.contains(where: { $0.hasSuffix(".xctoolchain") }) {
69+
let sessionResult = if toolchainPath.components.contains(where: { $0.hasSuffix(".app") }) {
7070
await service.createSession(name: name, developerPath: nil, resourceSearchPaths: packageManagerResourcesDirectory.map { [$0.pathString] } ?? [], cachePath: nil, inferiorProductsPath: nil, environment: nil)
7171
} else {
7272
await service.createSession(name: name, swiftToolchainPath: toolchainPath.pathString, resourceSearchPaths: packageManagerResourcesDirectory.map { [$0.pathString] } ?? [], cachePath: nil, inferiorProductsPath: nil, environment: nil)

0 commit comments

Comments
 (0)