Bug 1639815 - Move --enable-strip and --enable-install-strip to python configure. r=nalexander

Differential Revision: https://phabricator.services.mozilla.com/D76291
This commit is contained in:
Mike Hommey 2020-05-21 23:51:58 +00:00
Родитель 711ffb4939
Коммит 6ba1065508
5 изменённых файлов: 22 добавлений и 42 удалений

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

@ -215,7 +215,6 @@ def old_configure_options(*options):
'--enable-debug-js-modules',
'--enable-dump-painting',
'--enable-extensions',
'--enable-install-strip',
'--enable-libproxy',
'--enable-logrefcnt',
'--enable-mobile-optimize',
@ -227,7 +226,6 @@ def old_configure_options(*options):
'--enable-pref-extensions',
'--enable-sandbox',
'--enable-startupcache',
'--enable-strip',
'--enable-system-cairo',
'--enable-system-extension-dirs',
'--enable-system-pixman',

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

@ -530,7 +530,6 @@ case "$target" in
TARGET_COMPILER_ABI=msvc
RANLIB='echo not_ranlib'
STRIP='echo not_strip'
PKG_SKIP_STRIP=1
# aarch64 doesn't support subsystems below 6.02
if test "$CPU_ARCH" = "aarch64"; then
WIN32_SUBSYSTEM_VERSION=6.02
@ -1272,22 +1271,6 @@ if test -n "$COMPILE_ENVIRONMENT"; then
MOZ_CONFIG_CLANG_PLUGIN
fi # COMPILE_ENVIRONMENT
dnl ========================================================
dnl = Enable stripping of libs & executables
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(strip,
[ --enable-strip Enable stripping of libs & executables ],
ENABLE_STRIP=1,
ENABLE_STRIP= )
dnl ========================================================
dnl = Enable stripping of libs & executables when packaging
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(install-strip,
[ --enable-install-strip Enable stripping of libs & executables when packaging ],
PKG_SKIP_STRIP= ,
PKG_SKIP_STRIP=1)
dnl ========================================================
dnl =
dnl = Profiling and Instrumenting
@ -1394,8 +1377,6 @@ AC_SUBST_LIST(MOZ_DEBUG_LDFLAGS)
AC_SUBST_LIST(WARNINGS_CFLAGS)
AC_SUBST(LIBICONV)
AC_SUBST(ENABLE_STRIP)
AC_SUBST(PKG_SKIP_STRIP)
AC_SUBST(INCREMENTAL_LINKER)
AC_SUBST_LIST(MOZ_FIX_LINK_PATHS)

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

@ -651,6 +651,27 @@ js_option('--disable-icf', help='Disable Identical Code Folding')
add_old_configure_assignment(
'MOZ_DISABLE_ICF', '1', when=depends('--enable-icf')(lambda x: not x))
@depends(compile_environment, target)
def may_strip(compile_environment, target):
return compile_environment and target.kernel != 'WINNT'
js_option('--enable-strip', when=may_strip, help='Enable stripping of libs & executables')
set_config('ENABLE_STRIP', True, when='--enable-strip')
js_option('--disable-install-strip', when=may_strip,
help='Enable stripping of libs & executables when packaging')
# The nested depends is because depending on --enable-install-strip needs the
# `when=may_strip`, but we also need to test when may_strip is False.
@depends(depends('--enable-install-strip', when=may_strip)(lambda x: x), may_strip)
def pkg_skip_strip(install_strip, may_strip):
return not install_strip or not may_strip
set_config('PKG_SKIP_STRIP', True, when=pkg_skip_strip)
# Please do not add configure checks from here on.
# Fallthrough to autoconf-based configure

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

@ -635,7 +635,6 @@ case "$target" in
TARGET_COMPILER_ABI=msvc
RANLIB='echo not_ranlib'
STRIP='echo not_strip'
PKG_SKIP_STRIP=1
# aarch64 doesn't support subsystems below 6.02
if test "$CPU_ARCH" = "aarch64"; then
WIN32_SUBSYSTEM_VERSION=6.02
@ -877,7 +876,6 @@ fi
if test -z "$COMPILE_ENVIRONMENT"; then
SKIP_COMPILER_CHECKS=1
SKIP_LIBRARY_CHECKS=1
PKG_SKIP_STRIP=1
MOZ_DEBUGGING_OPTS
else
MOZ_COMPILER_OPTS
@ -2261,22 +2259,6 @@ if test -n "$COMPILE_ENVIRONMENT"; then
MOZ_CONFIG_CLANG_PLUGIN
fi # COMPILE_ENVIRONMENT
dnl ========================================================
dnl = Enable stripping of libs & executables
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(strip,
[ --enable-strip Enable stripping of libs & executables ],
ENABLE_STRIP=1,
ENABLE_STRIP= )
dnl ========================================================
dnl = Enable stripping of libs & executables when packaging
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(install-strip,
[ --enable-install-strip Enable stripping of libs & executables when packaging ],
PKG_SKIP_STRIP= ,
PKG_SKIP_STRIP=1)
dnl ========================================================
dnl = frontend JS debug mode
dnl ========================================================
@ -2688,8 +2670,6 @@ AC_SUBST(MOZ_UPDATER)
AC_SUBST(MOZ_ANDROID_APPLICATION_CLASS)
AC_SUBST(MOZ_ANDROID_BROWSER_INTENT_CLASS)
AC_SUBST(MOZ_EXCLUDE_HYPHENATION_DICTIONARIES)
AC_SUBST(ENABLE_STRIP)
AC_SUBST(PKG_SKIP_STRIP)
AC_SUBST(STRIP_FLAGS)
AC_SUBST(INCREMENTAL_LINKER)

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

@ -86,7 +86,7 @@ def may_strip(path):
Return whether strip() should be called
'''
from buildconfig import substs
return not substs['PKG_SKIP_STRIP']
return not substs.get('PKG_SKIP_STRIP')
def strip(path):