devops: support apple silicon builds of Firefox (#4979)

This commit is contained in:
Andrey Lushnikov 2021-01-12 03:57:59 +03:00 коммит произвёл GitHub
Родитель 725191967b
Коммит 7665a6ec7f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 30 добавлений и 11 удалений

Просмотреть файл

@ -63,3 +63,4 @@ fi
git pull origin master
../checkout_build_archive_upload.sh webkit-mac-11.0-arm64 >/tmp/$(basename $0)--webkit-mac-11.0-arm64.log || true
../checkout_build_archive_upload.sh firefox-mac-11.0-arm64 >/tmp/$(basename $0)--firefox-mac-11.0-arm64.log || true

Просмотреть файл

@ -100,6 +100,12 @@ elif [[ "$BUILD_FLAVOR" == "firefox-mac-10.14" ]]; then
EXPECTED_HOST_OS="Darwin"
EXPECTED_HOST_OS_VERSION="10.14"
BUILD_BLOB_NAME="firefox-mac-10.14.zip"
elif [[ "$BUILD_FLAVOR" == "firefox-mac-11.0-arm64" ]]; then
BROWSER_NAME="firefox"
EXPECTED_HOST_OS="Darwin"
EXPECTED_HOST_OS_VERSION="11.0"
EXPECTED_ARCH="arm64"
BUILD_BLOB_NAME="firefox-mac-11.0-arm64.zip"
elif [[ "$BUILD_FLAVOR" == "firefox-win32" ]]; then
BROWSER_NAME="firefox"
EXPECTED_HOST_OS="MINGW"

Просмотреть файл

@ -23,18 +23,30 @@ fi
if [[ "$(uname)" == "Darwin" ]]; then
# Firefox currently does not build on 10.15 out of the box - it requires SDK for 10.12.
# Make sure the SDK is out there.
if ! [[ -d $HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk ]]; then
echo "As of Dec 2020, Firefox does not build on Mac without ${MACOS_SDK_VERSION} SDK."
echo "Download XCode ${XCODE_VERSION_WITH_REQUIRED_SDK_VERSION} from https://developer.apple.com/download/more/ and"
echo "extract SDK to $HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk"
echo ""
echo "More info: https://firefox-source-docs.mozilla.org/setup/macos_build.html"
exit 1
if [[ $(uname -m) == "arm64" ]]; then
# Building on Apple Silicon requires XCode12.2 and does not require any extra SDKs.
if ! [[ -d "/Applications/Xcode12.2.app" ]]; then
echo "As of Jan 2021, building Firefox on Apple Silicon requires XCode 12.2"
echo "Make sure there's an /Applications/Xcode12.2.app"
echo "Download XCode from https://developer.apple.com/download/more/"
echo ""
exit 1
fi
export DEVELOPER_DIR=/Applications/Xcode12.2.app/Contents/Developer
else
echo "-- configuting .mozconfig with ${MACOS_SDK_VERSION} SDK path"
echo "ac_add_options --with-macos-sdk=$HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk/" > .mozconfig
# Firefox currently does not build on 10.15 out of the box - it requires SDK for 10.12.
# Make sure the SDK is out there.
if ! [[ -d $HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk ]]; then
echo "As of Dec 2020, Firefox does not build on Mac without ${MACOS_SDK_VERSION} SDK."
echo "Download XCode ${XCODE_VERSION_WITH_REQUIRED_SDK_VERSION} from https://developer.apple.com/download/more/ and"
echo "extract SDK to $HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk"
echo ""
echo "More info: https://firefox-source-docs.mozilla.org/setup/macos_build.html"
exit 1
else
echo "-- configuting .mozconfig with ${MACOS_SDK_VERSION} SDK path"
echo "ac_add_options --with-macos-sdk=$HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk/" > .mozconfig
fi
fi
echo "-- building on Mac"
elif [[ "$(uname)" == "Linux" ]]; then