Bug 1900275 - Move MOZ_STUB_INSTALLER from confvars.sh to moz.configure r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D212388
This commit is contained in:
serge-sans-paille 2024-06-17 07:45:19 +00:00
Родитель b4c0c09aed
Коммит 42eadf3cbf
4 изменённых файлов: 36 добавлений и 22 удалений

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

@ -3,26 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
if test "$OS_ARCH" = "WINNT"; then
if ! test "$HAVE_64BIT_BUILD"; then
if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \
"$MOZ_UPDATE_CHANNEL" = "nightly-try" -o \
"$MOZ_UPDATE_CHANNEL" = "aurora" -o \
"$MOZ_UPDATE_CHANNEL" = "beta" -o \
"$MOZ_UPDATE_CHANNEL" = "release"; then
if ! test "$MOZ_DEBUG"; then
if ! test "$USE_STUB_INSTALLER"; then
# Expect USE_STUB_INSTALLER from taskcluster for downstream task consistency
echo "ERROR: STUB installer expected to be enabled but"
echo "ERROR: USE_STUB_INSTALLER is not specified in the environment"
exit 1
fi
MOZ_STUB_INSTALLER=1
fi
fi
fi
fi
# MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
# MOZ_BRANDING_DIRECTORY is the default branding directory used when none is
# specified. It should never point to the "official" branding directory.

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

@ -24,4 +24,32 @@ with only_when(target_has_linux_kernel & compile_environment):
set_config("MOZ_NO_PIE_COMPAT", depends_if("MOZ_NO_PIE_COMPAT")(lambda _: True))
@depends(target, update_channel, have_64_bit, moz_debug, "MOZ_AUTOMATION")
@imports(_from="os", _import="environ")
def requires_stub_installer(
target, update_channel, have_64_bit, moz_debug, moz_automation
):
if target.kernel != "WINNT":
return False
if have_64_bit:
return False
if update_channel not in ("nightly", "nightly-try", "aurora", "beta", "release"):
return False
if moz_debug:
return False
# Expect USE_STUB_INSTALLER from taskcluster for downstream task consistency
if moz_automation and not environ.get("USE_STUB_INSTALLER"):
die(
"STUB installer expected to be enabled but "
"USE_STUB_INSTALLER is not specified in the environment"
)
return True
imply_option("MOZ_STUB_INSTALLER", True, when=requires_stub_installer)
include("../toolkit/moz.configure")

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

@ -625,8 +625,6 @@ dnl ========================================================
AC_SUBST_LIST(ASFLAGS)
AC_SUBST_LIST(MOZ_DEBUG_LDFLAGS)
AC_SUBST(MOZ_STUB_INSTALLER)
AC_SUBST_LIST(MOZ_FIX_LINK_PATHS)
dnl ========================================================

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

@ -41,6 +41,14 @@ project_flag(
help="which devtools version should be built",
)
option(
env="MOZ_STUB_INSTALLER",
help="produce a stub installer",
)
set_config("MOZ_STUB_INSTALLER", True, when="MOZ_STUB_INSTALLER")
project_flag(
env="MOZ_PROFILE_MIGRATOR",
help="enable profile migrator",