File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Sources/BuildSystemIntegration Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -69,21 +69,25 @@ private func preferredToolchain(_ toolchainRegistry: ToolchainRegistry) async ->
69
69
] )
70
70
}
71
71
72
- fileprivate extension BuildTriple {
72
+ fileprivate extension BuildDestination {
73
73
/// A string that can be used to identify the build triple in `ConfiguredTarget.runDestinationID`.
74
+ ///
75
+ /// `BuildSystemManager.canonicalConfiguredTarget` picks the canonical target based on alphabetical
76
+ /// ordering. We rely on the string "destination" being ordered before "tools" so that we prefer a
77
+ /// `destination` (or "target") target over a `tools` (or "host") target.
74
78
var id : String {
75
79
switch self {
76
- case . tools :
80
+ case . host :
77
81
return " tools "
78
- case . destination :
82
+ case . target :
79
83
return " destination "
80
84
}
81
85
}
82
86
}
83
87
84
88
fileprivate extension ConfiguredTarget {
85
89
init ( _ buildTarget: any SwiftBuildTarget ) {
86
- self . init ( targetID: buildTarget. name, runDestinationID: buildTarget. buildTriple . id)
90
+ self . init ( targetID: buildTarget. name, runDestinationID: buildTarget. destination . id)
87
91
}
88
92
89
93
static let forPackageManifest = ConfiguredTarget ( targetID: " " , runDestinationID: " " )
You can’t perform that action at this time.
0 commit comments