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 {
143
143
toolset. swiftCompiler = Toolset . ToolProperties ( extraCLIOptions: swiftCompilerOptions)
144
144
145
145
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
+ }
147
152
}
148
153
149
154
package func applyPlatformOptions(
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ final class LinuxRecipeTests: XCTestCase {
116
116
]
117
117
)
118
118
XCTAssertEqual ( toolset. cxxCompiler? . extraCLIOptions, [ " -lstdc++ " ] )
119
- XCTAssertEqual ( toolset. librarian? . path , " llvm-ar " )
119
+ XCTAssert ( toolset. librarian == nil )
120
120
XCTAssert ( toolset. linker == nil )
121
121
}
122
122
You can’t perform that action at this time.
0 commit comments