Skip to content

Commit 311e535

Browse files
Do not create a symlink for swift-autolink-extract if swift is not installed (#92)
If `swift` is not installed in the final toolchain in the SDK, we don't need `swift-autolink-extract` either.
1 parent bbf2442 commit 311e535

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/SwiftSDKGenerator/SwiftSDKRecipes/WebAssemblyRecipe.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ public struct WebAssemblyRecipe: SwiftSDKRecipe {
100100
let autolinkExtractPath = generator.pathsConfiguration.toolchainBinDirPath.appending("swift-autolink-extract")
101101

102102
// WebAssembly object file requires `swift-autolink-extract`
103-
if await !generator.doesFileExist(at: autolinkExtractPath) {
103+
if await !generator.doesFileExist(at: autolinkExtractPath),
104+
await generator.doesFileExist(at: generator.pathsConfiguration.toolchainBinDirPath.appending("swift")) {
104105
logGenerationStep("Fixing `swift-autolink-extract` symlink...")
105106
try await generator.createSymlink(at: autolinkExtractPath, pointingTo: "swift")
106107
}

0 commit comments

Comments
 (0)