Skip to content

Commit fb6fc9c

Browse files
Prefer llvm-ar over ar on WebAssembly
Static "ar"chivers not prefixed with "llvm-" rarely support WebAssembly object file formats, and the legacy driver uses "llvm-ar", so it would be better to keep the consistency.
1 parent 0da3ecf commit fb6fc9c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Sources/SwiftDriver/Toolchains/WebAssemblyToolchain.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ public final class WebAssemblyToolchain: Toolchain {
9595
switch tool {
9696
case .swiftCompiler:
9797
return try lookup(executable: "swift-frontend")
98-
case .staticLinker(nil):
99-
return try lookup(executable: "ar")
100-
case .staticLinker(.llvmFull),
101-
.staticLinker(.llvmThin):
98+
case .staticLinker:
10299
return try lookup(executable: "llvm-ar")
103100
case .dynamicLinker:
104101
// FIXME: This needs to look in the tools_directory first.

0 commit comments

Comments
 (0)