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 ->
6969 ] )
7070}
7171
72- fileprivate extension BuildTriple {
72+ fileprivate extension BuildDestination {
7373 /// 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.
7478 var id : String {
7579 switch self {
76- case . tools :
80+ case . host :
7781 return " tools "
78- case . destination :
82+ case . target :
7983 return " destination "
8084 }
8185 }
8286}
8387
8488fileprivate extension ConfiguredTarget {
8589 init ( _ buildTarget: any SwiftBuildTarget ) {
86- self . init ( targetID: buildTarget. name, runDestinationID: buildTarget. buildTriple . id)
90+ self . init ( targetID: buildTarget. name, runDestinationID: buildTarget. destination . id)
8791 }
8892
8993 static let forPackageManifest = ConfiguredTarget ( targetID: " " , runDestinationID: " " )
You can’t perform that action at this time.
0 commit comments