Skip to content

Commit 389edb7

Browse files
authored
Avoid host triple computation in BuildParameters.forTriple() (#6900)
We now the triple here, so we shouldn't have it be recomputed from scratch.
1 parent 9306b79 commit 389edb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/SPMBuildCore/BuildParameters.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,13 @@ public struct BuildParameters: Encodable {
473473
testEntryPointPath = nil
474474
}
475475

476+
var hostSDK = try SwiftSDK.hostSwiftSDK()
477+
hostSDK.targetTriple = targetTriple
478+
476479
return try .init(
477480
dataPath: self.dataPath.parentDirectory.appending(components: ["plugins", "tools"]),
478481
configuration: self.configuration,
479-
toolchain: try UserToolchain(swiftSDK: SwiftSDK.hostSwiftSDK()),
482+
toolchain: try UserToolchain(swiftSDK: hostSDK),
480483
hostTriple: self.hostTriple,
481484
targetTriple: targetTriple,
482485
flags: BuildFlags(),

0 commit comments

Comments
 (0)