Skip to content

Commit a5b8982

Browse files
authored
Merge pull request #1876 from 3405691582/amd64
2 parents 7be4f6e + fd8d0cf commit a5b8982

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ import struct TSCBasic.AbsolutePath
1818
extension GenericUnixToolchain {
1919
private func majorArchitectureName(for triple: Triple) -> String {
2020
// The concept of a "major" arch name only applies to Linux triples
21-
guard triple.os == .linux else { return triple.archName }
21+
// We change spellings for amd64/x86_64 for OpenBSD here too to match LLVM.
22+
guard triple.os == .linux || triple.os == .openbsd else { return triple.archName }
23+
24+
if triple.os == .openbsd && triple.archName == "amd64" { return "x86_64" }
2225

2326
// HACK: We don't wrap LLVM's ARM target architecture parsing, and we should
2427
// definitely not try to port it. This check was only normalizing

0 commit comments

Comments
 (0)