Skip to content

Commit 9208a2d

Browse files
committed
Remove triple from SwiftBuild system output path
The triple name in the SwiftBuild build system is redundant. Remove the triple from the output path.
1 parent e1f3ce2 commit 9208a2d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Sources/SPMBuildCore/Triple+Extensions.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ extension Triple {
3232
// can be used to build for any Apple platform and it has its own
3333
// conventions for build subpaths based on platforms.
3434
return "apple"
35-
case .swiftbuild, .native:
35+
case .swiftbuild:
36+
return ""
37+
case .native:
3638
return self.platformBuildPathComponent
3739
}
3840
}

Sources/_InternalTestSupport/BuildSystemProvider+Configuration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ extension BuildSystemProvider.Kind {
6666
case .native:
6767
return scratchPath + [tripleString, "\(config)".lowercased()]
6868
case .swiftbuild:
69-
return scratchPath + [tripleString, "Products", "\(config)".capitalized + suffix]
69+
return scratchPath + ["Products", "\(config)".capitalized + suffix]
7070
case .xcode:
7171
return scratchPath + ["apple", "Products", "\(config)".capitalized + suffix]
7272
}

Tests/IntegrationTests/SwiftPMTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ private struct SwiftPMTests {
192192
)
193193
case .swiftbuild:
194194
fooPath = try AbsolutePath(
195-
validating: ".build/\(arch)-apple-macosx/Products/Debug/foo",
195+
validating: ".build/Products/Debug/foo",
196196
relativeTo: packagePath
197197
)
198198
default:
@@ -225,7 +225,7 @@ private struct SwiftPMTests {
225225
)
226226
case .swiftbuild:
227227
fooPath = try AbsolutePath(
228-
validating: ".build/\(hostArch)-apple-macosx/Products/Debug/foo",
228+
validating: ".build/Products/Debug/foo",
229229
relativeTo: packagePath
230230
)
231231
default:

0 commit comments

Comments
 (0)