Merge pull request #14173 from carlocab/rm-change-arch

brew.sh: remove `HOMEBREW_CHANGE_ARCH_TO_ARM`
This commit is contained in:
Mike McQuaid 2022-11-29 11:15:20 +00:00 committed by GitHub
commit b936fd6677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 21 deletions

View File

@ -13,7 +13,6 @@ permissions:
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_CHANGE_ARCH_TO_ARM: 1
jobs:
tests:
strategy:

View File

@ -13,26 +13,6 @@ case "${HOMEBREW_SYSTEM}" in
Linux) HOMEBREW_LINUX="1" ;;
esac
if [[ "${HOMEBREW_MACOS}" == "1" ]] &&
[[ "$(sysctl -n hw.optional.arm64 2>/dev/null)" == "1" ]]
then
# used in vendor-install.sh
# shellcheck disable=SC2034
HOMEBREW_PHYSICAL_PROCESSOR="arm64"
HOMEBREW_ROSETTA="$(sysctl -n sysctl.proc_translated)"
# If we're running under macOS Rosetta 2, and it was requested by setting
# HOMEBREW_CHANGE_ARCH_TO_ARM (for example in CI), then we re-exec this
# same file under the native architecture
# These variables are set from the user environment.
# shellcheck disable=SC2154
if [[ "${HOMEBREW_CHANGE_ARCH_TO_ARM}" == "1" ]] &&
[[ "${HOMEBREW_ROSETTA}" == "1" ]]
then
exec arch -arm64e "${HOMEBREW_BREW_FILE}" "$@"
fi
fi
# Where we store built products; a Cellar in HOMEBREW_PREFIX (often /usr/local
# for bottles) unless there's already a Cellar in HOMEBREW_REPOSITORY.
# These variables are set by bin/brew
@ -170,6 +150,8 @@ safe_cd() {
}
brew() {
# This variable is set by bin/brew
# shellcheck disable=SC2154
"${HOMEBREW_BREW_FILE}" "$@"
}
@ -442,6 +424,13 @@ then
# Don't change this from Mac OS X to match what macOS itself does in Safari on 10.12
HOMEBREW_OS_USER_AGENT_VERSION="Mac OS X ${HOMEBREW_MACOS_VERSION}"
if [[ "$(sysctl -n hw.optional.arm64 2>/dev/null)" == "1" ]]
then
# used in vendor-install.sh
# shellcheck disable=SC2034
HOMEBREW_PHYSICAL_PROCESSOR="arm64"
fi
# Intentionally set this variable by exploding another.
# shellcheck disable=SC2086,SC2183
printf -v HOMEBREW_MACOS_VERSION_NUMERIC "%02d%02d%02d" ${HOMEBREW_MACOS_VERSION//./ }