File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,9 +106,11 @@ case "${MATRIX_CPU}" in
106106 ;;
107107 macos)
108108 info " Installing dependencies for $( hl " macOS arm64" ) build"
109- # macOS arm64 — no extra deps, use native CPU
109+ # macOS arm64 — no extra deps; no CPU tuning because the
110+ # job cross-compiles from an Intel runner (`macos-latest-large`),
111+ # so `-C target-cpu=native` would emit x86_64 feature flags
112+ # against the aarch64 backend and fail codegen.
110113 target=" aarch64-apple-darwin"
111- target_cpu=" native"
112114 ;;
113115 * )
114116 error " Unsupported arch $( hl " ${MATRIX_ARCH} " ) for cpu $( hl " ${MATRIX_CPU} " ) "
@@ -203,10 +205,11 @@ case "${target}" in
203205 }
204206 ;;
205207
206- # macOS aarch64 — native CPU tuning, no cross-linker needed
208+ # macOS aarch64 — cross-compiled from an Intel runner, so no CPU tuning
209+ # and no cross-linker (the Apple toolchain handles aarch64 natively).
207210 aarch64-apple-darwin)
208- info " Building $( hl " ${target} " ) : ${CMD} ${bins} --target ${target} --config build.rustflags= \"\\\" -C target-cpu= ${target_cpu} \\\"\" "
209- ${CMD} ${bins} --target " ${target} " --config build.rustflags= " \" -C target-cpu= ${target_cpu} \" " || {
211+ info " Building $( hl " ${target} " ) : ${CMD} ${bins} --target ${target} "
212+ ${CMD} ${bins} --target " ${target} " || {
210213 error " Build failed for target $( hl " ${target} " ) "
211214 exit 1
212215 }
You can’t perform that action at this time.
0 commit comments