зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1279369 - Move --enable-debug, MOZ_DEBUG_FLAGS, and --enable-debug-symbols to Python configure. r=glandium
Setting MOZ_DEBUG_SYMBOLS as a define was not moved, as this value is not checked, and exporting MOZ_DEBUG_SYMBOLS was not moved, as this would only impact nspr, and we're no longer using the nspr build system. MozReview-Commit-ID: EvBTunhxcsr
This commit is contained in:
Родитель
025749bed2
Коммит
93ef406a76
|
@ -95,30 +95,6 @@ dnl =
|
|||
dnl ========================================================
|
||||
AC_DEFUN([MOZ_DEBUGGING_OPTS],
|
||||
[
|
||||
dnl Debug info is ON by default.
|
||||
if test -z "$MOZ_DEBUG_FLAGS"; then
|
||||
if test -n "$_MSC_VER"; then
|
||||
MOZ_DEBUG_FLAGS="-Zi"
|
||||
else
|
||||
MOZ_DEBUG_FLAGS="-g"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_DEBUG_FLAGS)
|
||||
|
||||
MOZ_ARG_ENABLE_STRING(debug,
|
||||
[ --enable-debug[=DBG] Enable building with developer debug info
|
||||
(using compiler flags DBG)],
|
||||
[ if test "$enableval" != "no"; then
|
||||
MOZ_DEBUG=1
|
||||
if test -n "$enableval" -a "$enableval" != "yes"; then
|
||||
MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
|
||||
_MOZ_DEBUG_FLAGS_SET=1
|
||||
fi
|
||||
else
|
||||
MOZ_DEBUG=
|
||||
fi ],
|
||||
MOZ_DEBUG=)
|
||||
|
||||
if test -z "$MOZ_DEBUG" -o -n "$MOZ_ASAN"; then
|
||||
MOZ_NO_DEBUG_RTL=1
|
||||
|
@ -156,31 +132,6 @@ fi
|
|||
|
||||
AC_SUBST_LIST(MOZ_DEBUG_DEFINES)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable generation of debug symbols
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_STRING(debug-symbols,
|
||||
[ --enable-debug-symbols[=DBG]
|
||||
Enable debugging symbols (using compiler flags DBG)],
|
||||
[ if test "$enableval" != "no"; then
|
||||
MOZ_DEBUG_SYMBOLS=1
|
||||
if test -n "$enableval" -a "$enableval" != "yes"; then
|
||||
if test -z "$_MOZ_DEBUG_FLAGS_SET"; then
|
||||
MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
|
||||
else
|
||||
AC_MSG_ERROR([--enable-debug-symbols flags cannot be used with --enable-debug flags])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
MOZ_DEBUG_SYMBOLS=
|
||||
fi ],
|
||||
MOZ_DEBUG_SYMBOLS=1)
|
||||
|
||||
if test -n "$MOZ_DEBUG" -o -n "$MOZ_DEBUG_SYMBOLS"; then
|
||||
AC_DEFINE(MOZ_DEBUG_SYMBOLS)
|
||||
export MOZ_DEBUG_SYMBOLS
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
dnl A high level macro for selecting compiler options.
|
||||
|
|
|
@ -172,9 +172,7 @@ def old_configure_options(*options):
|
|||
'--enable-ctypes',
|
||||
'--enable-dbm',
|
||||
'--enable-dbus',
|
||||
'--enable-debug',
|
||||
'--enable-debug-js-modules',
|
||||
'--enable-debug-symbols',
|
||||
'--enable-directshow',
|
||||
'--enable-dtrace',
|
||||
'--enable-dump-painting',
|
||||
|
|
|
@ -604,3 +604,39 @@ host_c_compiler = compiler('C', host, other_compiler=c_compiler)
|
|||
host_cxx_compiler = compiler('C++', host, c_compiler=host_c_compiler,
|
||||
other_compiler=cxx_compiler,
|
||||
other_c_compiler=c_compiler)
|
||||
|
||||
@depends(c_compiler)
|
||||
def default_debug_flags(compiler_info):
|
||||
# Debug info is ON by default.
|
||||
if compiler_info.type == 'msvc':
|
||||
return '-Zi'
|
||||
return '-g'
|
||||
|
||||
option(env='MOZ_DEBUG_FLAGS',
|
||||
nargs=1,
|
||||
help='Debug compiler flags')
|
||||
|
||||
imply_option('--enable-debug-symbols',
|
||||
depends_if('--enable-debug')(lambda v: v))
|
||||
|
||||
js_option('--enable-debug-symbols',
|
||||
nargs='?',
|
||||
default=True,
|
||||
help='Enable debug symbols using the given compiler flags')
|
||||
|
||||
set_config('MOZ_DEBUG_SYMBOLS',
|
||||
depends_if('--enable-debug-symbols')(lambda _: True))
|
||||
|
||||
@depends('MOZ_DEBUG_FLAGS', '--enable-debug-symbols', default_debug_flags)
|
||||
def debug_flags(env_debug_flags, enable_debug_flags, default_debug_flags):
|
||||
# If MOZ_DEBUG_FLAGS is set, and --enable-debug-symbols is set to a value,
|
||||
# --enable-debug-symbols takes precedence. Note, the value of
|
||||
# --enable-debug-symbols may be implied by --enable-debug.
|
||||
if len(enable_debug_flags):
|
||||
return enable_debug_flags[0]
|
||||
if env_debug_flags:
|
||||
return env_debug_flags[0]
|
||||
return default_debug_flags
|
||||
|
||||
set_config('MOZ_DEBUG_FLAGS', debug_flags)
|
||||
add_old_configure_assignment('MOZ_DEBUG_FLAGS', debug_flags)
|
||||
|
|
|
@ -2432,7 +2432,6 @@ AC_SUBST(IMPLIB)
|
|||
AC_SUBST(FILTER)
|
||||
AC_SUBST(BIN_FLAGS)
|
||||
AC_SUBST(MOZ_DEBUG)
|
||||
AC_SUBST(MOZ_DEBUG_SYMBOLS)
|
||||
AC_SUBST(MOZ_DEBUG_LDFLAGS)
|
||||
AC_SUBST(WARNINGS_AS_ERRORS)
|
||||
AC_SUBST(LIBICONV)
|
||||
|
|
|
@ -85,6 +85,14 @@ set_define('GTEST_USE_OWN_TR1_TUPLE',
|
|||
set_define('GTEST_HAS_CLONE',
|
||||
delayed_getattr(linux_gtest_defines, 'has_clone'))
|
||||
|
||||
js_option('--enable-debug',
|
||||
nargs='?',
|
||||
help='Enable building with developer debug info '
|
||||
'(using the given compiler flags).')
|
||||
|
||||
add_old_configure_assignment('MOZ_DEBUG',
|
||||
depends_if('--enable-debug')(lambda _: True))
|
||||
|
||||
@depends('--disable-compile-environment', '--help')
|
||||
def toolchain_include(compile_env, help):
|
||||
if compile_env:
|
||||
|
|
|
@ -6477,7 +6477,6 @@ AC_SUBST(BIN_FLAGS)
|
|||
AC_SUBST(MOZ_AUTH_EXTENSION)
|
||||
AC_SUBST(MOZ_PREF_EXTENSIONS)
|
||||
AC_SUBST(MOZ_DEBUG)
|
||||
AC_SUBST(MOZ_DEBUG_SYMBOLS)
|
||||
AC_SUBST(MOZ_DEBUG_LDFLAGS)
|
||||
AC_SUBST(WARNINGS_AS_ERRORS)
|
||||
AC_SUBST_SET(MOZ_EXTENSIONS)
|
||||
|
|
Загрузка…
Ссылка в новой задаче