devops: attempt to fix Firefox M95 release compilation (#10908)

Builders fail to download release toolchains; fallback to
LLVM from Homebrew on Mac.

References #10759
This commit is contained in:
Andrey Lushnikov 2021-12-14 00:49:35 -08:00 коммит произвёл GitHub
Родитель 2a8801be1e
Коммит 6552556608
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 21 добавлений и 1 удалений

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

@ -86,10 +86,30 @@ if [[ $1 != "--juggler" ]]; then
fi fi
if [[ $1 == "--full" || $2 == "--full" ]]; then if [[ $1 == "--full" || $2 == "--full" ]]; then
echo "ac_add_options --enable-bootstrap" >> .mozconfig
if [[ "$(uname)" == "Darwin" || "$(uname)" == "Linux" ]]; then if [[ "$(uname)" == "Darwin" || "$(uname)" == "Linux" ]]; then
SHELL=/bin/sh ./mach --no-interactive bootstrap --application-choice=browser SHELL=/bin/sh ./mach --no-interactive bootstrap --application-choice=browser
fi fi
if [[ "$(uname)" == "Darwin" ]]; then
HOMEBREW_LLVM="/opt/homebrew/opt/llvm/bin/clang";
if [[ ! -f "${HOMEBREW_LLVM}" || $($HOMEBREW_LLVM --version) != *"version 13"* ]]; then
echo "ERROR: as of Dec, 2021, building release firefox requires HomeBrew LLVM v13"
echo "Please run:"
echo
echo " brew install llvm@13"
echo
exit 1
fi
echo "CC=${HOMEBREW_LLVM}" >> .mozconfig
echo "CXX=${HOMEBREW_LLVM}++" >> .mozconfig
# Download wasi toolchain if needed
if [[ ! -d "$HOME/.mozbuild/sysroot-wasm32-wasi" ]]; then
./mach artifact toolchain --from-build toolchain-sysroot-wasm32-wasi
mv ./sysroot-wasm32-wasi ~/.mozbuild/
fi
elif [[ "$(uname)" == "Linux" ]]; then
echo "ac_add_options --enable-bootstrap" >> .mozconfig
fi
if [[ ! -z "${WIN32_REDIST_DIR}" ]]; then if [[ ! -z "${WIN32_REDIST_DIR}" ]]; then
# Having this option in .mozconfig kills incremental compilation. # Having this option in .mozconfig kills incremental compilation.
echo "export WIN32_REDIST_DIR=\"$WIN32_REDIST_DIR\"" >> .mozconfig echo "export WIN32_REDIST_DIR=\"$WIN32_REDIST_DIR\"" >> .mozconfig