Don't use -mcpu=native on aarch64-macos
authorMatt Corallo <git@bluematt.me>
Thu, 12 May 2022 20:42:23 +0000 (20:42 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 13 May 2022 16:05:11 +0000 (16:05 +0000)
genbindings.sh

index 25bf60f8f336c38175c360e70f051fe4d3a969e1..62719fcca5614c6abf251f23f88b5b8a505b864a 100755 (executable)
@@ -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"