Skip to content

PackageModel: support the unified swift modules for XCTest #4300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Sources/PackageModel/UserToolchain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,16 @@ public final class UserToolchain: Toolchain {
.appending(component: "XCTest-\(info.defaults.xctestVersion)")

xctest = [
"-I", AbsolutePath("usr/lib/swift/windows", relativeTo: installation).pathString,
// Migration Path
//
// Older Swift (<=5.7) installations placed the
// XCTest Swift module into the architecture
// specified directory. This was in order to match
// the SDK setup. However, the toolchain finally
// gained the ability to consult the architecture
// indepndent directory for Swift modules, allowing
// the merged swiftmodules. XCTest followed suit.
"-I", AbsolutePath("usr/lib/swift/windows/\(triple.arch)", relativeTo: installation).pathString,
"-L", AbsolutePath("usr/lib/swift/windows/\(triple.arch)", relativeTo: installation).pathString,
]
Expand Down