Skip to content

Commit bdc3a80

Browse files
Don't include librarian path to llvm-ar when using preinstalled Swift toolchain
1 parent a0f6c54 commit bdc3a80

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/SwiftSDKGenerator/SwiftSDKRecipes/LinuxRecipe.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,12 @@ package struct LinuxRecipe: SwiftSDKRecipe {
143143
toolset.swiftCompiler = Toolset.ToolProperties(extraCLIOptions: swiftCompilerOptions)
144144

145145
toolset.cxxCompiler = Toolset.ToolProperties(extraCLIOptions: ["-lstdc++"])
146-
toolset.librarian = Toolset.ToolProperties(path: "llvm-ar")
146+
147+
// Don't include path to librarian if we're using the preinstalled toolchain
148+
// Workaround for https://github.com/swiftlang/swift-package-manager/issues/9035
149+
if self.hostSwiftSource != .preinstalled {
150+
toolset.librarian = Toolset.ToolProperties(path: "llvm-ar")
151+
}
147152
}
148153

149154
package func applyPlatformOptions(

0 commit comments

Comments
 (0)