     }
 
     // TODO: We should have some general utility to find tools.
-    private static func deriveXCTestPath(triple: Triple, environment: EnvironmentVariables) throws -> AbsolutePath? {
+    private static func deriveXCTestPath(destination: Destination, triple: Triple, environment: EnvironmentVariables) throws -> AbsolutePath? {
         if triple.isDarwin() {
             // XCTest is optional on macOS, for example when Xcode is not installed
             let xctestFindArgs = ["/usr/bin/xcrun", "--sdk", "macosx", "--find", "xctest"]

                        }
                    }

                    if let DEVELOPER_DIR = environment["DEVELOPER_DIR"],
                       let root = try? AbsolutePath(validating: DEVELOPER_DIR)
                        .appending(component: "Platforms")
                        .appending(component: "Windows.platform") {
                        if let info = WindowsPlatformInfo(reading: root.appending(component: "Info.plist"),
                                                          diagnostics: nil, filesystem: localFileSystem) {
                            let path: AbsolutePath =
                            root.appending(component: "Developer")
                                .appending(component: "Library")
                                .appending(component: "XCTest-\(info.defaults.xctestVersion)")

                            xctest = [
                                "-I", AbsolutePath("usr/lib/swift/windows/\(triple.arch)", relativeTo: path).pathString,
                                "-L", AbsolutePath("usr/lib/swift/windows/\(triple.arch)", relativeTo: path).pathString,
                            ]

                            // Migration Path
                            //
                            // In order to support multiple parallel
                            // installations of an SDK, we need to ensure that
                            // we can have all the architecture variant
                            // libraries available.  Prior to this getting
                            // enabled (~5.7), we always had a singular
                            // installed SDK.  Prefer the new variant which has
                            // an architecture subdirectory in `bin` if
                            // available.
                            let implib: AbsolutePath =
                                AbsolutePath("usr/lib/swift/windows/XCTest.lib", relativeTo: path)
                            if localFileSystem.exists(implib) {
                                xctest.append(contentsOf: ["-L", implib.parentDirectory.pathString])
                            }

                            extraSwiftCFlags = info.defaults.extraSwiftCFlags ??  []
                        }
                    }

                    return [ "-sdk", root.pathString, ] + runtime + xctest + extraSwiftCFlags
                }
            }


        if case let .custom(_, useXcrun) = searchStrategy, !useXcrun {
            xctestPath = nil
        } else {
            xctestPath = try Self.deriveXCTestPath(destination: self.destination, triple: triple, environment: environment)
        }

        self.configuration = .init(
