File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Sources/SwiftSDKGenerator/SwiftSDKRecipes
Tests/SwiftSDKGeneratorTests/SwiftSDKRecipes Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff 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(
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ final class LinuxRecipeTests: XCTestCase {
116116 ]
117117 )
118118 XCTAssertEqual ( toolset. cxxCompiler? . extraCLIOptions, [ " -lstdc++ " ] )
119- XCTAssertEqual ( toolset. librarian? . path , " llvm-ar " )
119+ XCTAssert ( toolset. librarian == nil )
120120 XCTAssert ( toolset. linker == nil )
121121 }
122122
You can’t perform that action at this time.
0 commit comments