Bug 1764882 - Use apple-m1 cpu target on mac arm64 builds. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D143818
This commit is contained in:
@@ -23,8 +23,9 @@ export MOZ_PACKAGE_JSSHELL=1
|
||||
ac_add_options --target=aarch64-apple-darwin
|
||||
export MACOS_SDK_DIR=$MOZ_FETCHES_DIR/MacOSX11.0.sdk
|
||||
|
||||
# Xcode clang defaults to something similar to -mcpu=apple-a12, while upstream
|
||||
# clang defaults to -mcpu=apple-a7, which disables a bunch of performance-enabling
|
||||
# CPU features. TODO: this should be done by configure.
|
||||
export CFLAGS="$CFLAGS -mcpu=apple-a12"
|
||||
export CXXFLAGS="$CXXFLAGS -mcpu=apple-a12"
|
||||
# As of Clang 13, the default is -mcpu=apple-m1 when using a aarch64-apple-macos target,
|
||||
# but we're using apple64-apple-darwin, which defaults to -mcpu=apple-a7, which disables
|
||||
# a bunch of # performance-enabling CPU features.
|
||||
# TODO: We'll want to switch to aarch64-apple-macos eventually.
|
||||
export CFLAGS="$CFLAGS -mcpu=apple-m1"
|
||||
export CXXFLAGS="$CXXFLAGS -mcpu=apple-m1"
|
||||
|
||||
@@ -18,7 +18,7 @@ aarch64-apple-darwin)
|
||||
arch=arm64
|
||||
export MACOSX_DEPLOYMENT_TARGET=11.0
|
||||
compiler_wrapper() {
|
||||
echo exec \$MOZ_FETCHES_DIR/clang/bin/$1 -mcpu=apple-a12 \"\$@\" > $1
|
||||
echo exec \$MOZ_FETCHES_DIR/clang/bin/$1 -mcpu=apple-m1 \"\$@\" > $1
|
||||
chmod +x $1
|
||||
}
|
||||
compiler_wrapper clang
|
||||
|
||||
Reference in New Issue
Block a user