Skip to content

Commit ee7f2a1

Browse files
committed
Toolchains: Fix as -arch parameter on macOS
1 parent 53c67b1 commit ee7f2a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

BinaryBuilderToolchains.jl/src/toolchains/CToolchain.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,9 @@ function binutils_wrappers(toolchain::CToolchain, dir::String)
13081308
if Sys.isapple(p)
13091309
# Warn if someone has asked for timestamps
13101310
flagmatch(io, [!flag"-arch"]) do io
1311-
append_flags(io, :PRE, ["-arch", arch(p)])
1311+
# macOS likes to use `arm64`, not `aarch64`:
1312+
arch_str = arch(p) == "aarch64" ? "arm64" : arch(p)
1313+
append_flags(io, :PRE, ["-arch", arch_str])
13121314
end
13131315

13141316
# Tell the `as` executable how to find the corresponding clang

0 commit comments

Comments
 (0)