Skip to content

Commit 92d1b16

Browse files
committed
Fix plugin with custom task invocation using swiftbuild on windows
- need to add .exe prefix to .builtTool binary so swiftbuild/llbuild file inputs are correct. closes: #9189 rdar://161337478
1 parent deac56d commit 92d1b16

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/SPMBuildCore/Plugins/PluginInvocation.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,8 @@ fileprivate func collectAccessibleTools(
697697
}
698698
// For an executable target we create a `builtTool`.
699699
else if executableOrBinaryModule.type == .executable {
700-
return try [.builtTool(name: builtToolName, path: RelativePath(validating: executableOrBinaryModule.name))]
700+
let exeName = executableOrBinaryModule.name + hostTriple.executableExtension
701+
return try [.builtTool(name: builtToolName, path: RelativePath(validating: exeName))]
701702
}
702703
else {
703704
return []

Tests/FunctionalTests/PluginTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ struct PluginTests {
380380
@Test(
381381
.issue("https://github.com/swiftlang/swift-package-manager/issues/9215", relationship: .verifies),
382382
.requiresSwiftConcurrencySupport,
383-
.disabled("rdar://162053979"),
384383
arguments: [BuildSystemProvider.Kind.native, .swiftbuild]
385384
)
386385
func testUseOfVendedBinaryTool(buildSystem: BuildSystemProvider.Kind) async throws {

0 commit comments

Comments
 (0)