From ba8a004783d52b23305025a5950a4bd2512d959c Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 12 May 2022 20:42:23 +0000 Subject: [PATCH] Don't use -mcpu=native on aarch64-macos --- genbindings.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/genbindings.sh b/genbindings.sh index 25bf60f..62719fc 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -70,6 +70,10 @@ case "$ENV_TARGET" in export RUSTFLAGS="$BASE_RUSTFLAGS -C target-cpu=sandybridge" export CFLAGS_$ENV_TARGET="$BASE_HOST_CFLAGS -march=sandybridge -mcpu=sandybridge -mtune=sandybridge" ;; + "aarch64_apple_darwin") + export RUSTFLAGS="$BASE_RUSTFLAGS -C target-cpu=apple-a14" + export CFLAGS_$ENV_TARGET="$BASE_HOST_CFLAGS -mcpu=apple-a14" + ;; *) # Assume this isn't targeted at another host and build for the host's CPU. export RUSTFLAGS="$BASE_RUSTFLAGS -C target-cpu=native" -- 2.39.5