File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Sources/SwiftBuildSupport Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ extension BuildSubset {
14
14
var pifTargetName : String {
15
15
switch self {
16
16
case . product( let name, _) :
17
- PackagePIFBuilder . targetName ( forProductName: name)
17
+ targetName ( forProductName: name)
18
18
case . target( let name, _) :
19
19
name
20
20
case . allExcludingTests:
Original file line number Diff line number Diff line change @@ -55,6 +55,12 @@ import struct PackageGraph.ResolvedProduct
55
55
56
56
import func PackageLoading. pkgConfigArgs
57
57
58
+ // TODO: Move this back to `PackagePIFBuilder` once we get rid of `#if canImport(SwiftBuild)`.
59
+ func targetName( forProductName name: String , suffix: TargetSuffix ? = nil ) -> String {
60
+ let suffix = suffix? . rawValue ?? " "
61
+ return " \( name) \( suffix) -product "
62
+ }
63
+
58
64
#if canImport(SwiftBuild)
59
65
60
66
import enum SwiftBuild. ProjectModel
@@ -145,8 +151,7 @@ extension PackagePIFBuilder {
145
151
/// This format helps make sure that targets and products with the same name (as they often have) have different
146
152
/// target names in the PIF.
147
153
static func targetName( forProductName name: String , suffix: TargetSuffix ? = nil ) -> String {
148
- let suffix = suffix? . rawValue ?? " "
149
- return " \( name) \( suffix) -product "
154
+ return SwiftBuildSupport . targetName ( forProductName: name, suffix: suffix)
150
155
}
151
156
}
152
157
You can’t perform that action at this time.
0 commit comments