Skip to content

Commit 53dba6c

Browse files
committed
fixup
1 parent 3da39cd commit 53dba6c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Sources/Workspace/UserToolchain.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public final class UserToolchain: Toolchain {
301301
: [])
302302
+ destination.extraSwiftCFlags
303303
}
304-
304+
305305
// MARK: - initializer
306306

307307
public init(destination: Destination, environment: [String: String] = ProcessEnv.vars) throws {
@@ -450,6 +450,12 @@ public final class UserToolchain: Toolchain {
450450
)
451451
}
452452

453+
// this tests if we are debugging / testing SwiftPM with CMake / bootstrap
454+
let cmakeLibrariesPath = applicationPath.parentDirectory.appending(components: "lib", "swift", "pm")
455+
if localFileSystem.exists(cmakeLibrariesPath) {
456+
return .init(root: cmakeLibrariesPath)
457+
}
458+
453459
// default case - no custom location which will use the one from the toolchain
454460
return nil
455461
}

0 commit comments

Comments
 (0)