Kaydet (Commit) 99db9f22 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Make --enable-symbols orthogonal to --enable-debug/-dbgutil

Change-Id: I523bc1d848e40489370eefe00046e0a257ed2505
Reviewed-on: https://gerrit.libreoffice.org/27058Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 436ee098
......@@ -236,7 +236,7 @@ bridges_NON_CALL_EXCEPTIONS_FLAGS := -fnon-call-exceptions
endif
endif
bridges_DEBUGINFO_FLAGS := $(if $(filter-out 0,$(gb_DEBUGLEVEL))$(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))
bridges_DEBUGINFO_FLAGS := $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))
$(eval $(call gb_Library_use_libraries,$(gb_CPPU_ENV)_uno,\
cppu \
......
......@@ -1150,9 +1150,9 @@ AC_ARG_ENABLE(selective-debuginfo,
AC_ARG_ENABLE(symbols,
AS_HELP_STRING([--enable-symbols],
[Include debugging symbols in output while preserve optimization.
This enables -g compiler flag for GCC or equivalent,
without changing anything else compared to productive code.]))
[Generate debug information.
By default, enabled for --enable-debug and --enable-dbgutil, disabled
otherwise.]))
AC_ARG_ENABLE(runtime-optimizations,
AS_HELP_STRING([--disable-runtime-optimizations],
......@@ -4034,14 +4034,16 @@ AC_SUBST(ENABLE_DEBUGINFO_FOR)
dnl Check for enable symbols option
dnl ===================================================================
AC_MSG_CHECKING([whether to include symbols while preserve optimization])
if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
ENABLE_SYMBOLS="TRUE"
if test -n "$ENABLE_DBGUTIL"; then
AC_MSG_ERROR([--enable-dbgutil cannot be used with --enable-symbols])
elif test -n "$ENABLE_DEBUG"; then
AC_MSG_ERROR([--enable-debug cannot be used with --enable-symbols])
AC_MSG_CHECKING([whether to generate debug information])
if test -z "$enable_symbols"; then
if test -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
enable_symbols=yes
else
enable_symbols=no
fi
fi
if test "$enable_symbols" != no; then
ENABLE_SYMBOLS=TRUE
AC_MSG_RESULT([yes])
else
ENABLE_SYMBOLS=
......
......@@ -52,14 +52,14 @@ else # $(OS)
icu_CFLAGS:=" \
$(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
$(if $(SYSBASE),-I$(SYSBASE)/usr/include) \
$(if $(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
$(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
$(if $(filter ANDROID,$(OS)),-fvisibility=hidden -fno-omit-frame-pointer)"
icu_CXXFLAGS:="$(CXXFLAGS) $(CXXFLAGS_CXX11) \
$(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
$(if $(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
$(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
......
......@@ -44,8 +44,8 @@ gb_LinkTarget__debug_enabled = \
# debug flags, if ENABLE_DEBUG is set and the LinkTarget is named
# in the list of libraries of ENABLE_DEBUGINFO_FOR
gb_LinkTarget__get_debugcflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS) $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)))
gb_LinkTarget__get_debugcxxflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS),$(gb_COMPILEROPTFLAGS) $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)))
gb_LinkTarget__get_debugcflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))
gb_LinkTarget__get_debugcxxflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS),$(gb_COMPILEROPTFLAGS)) $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))
# similar for LDFLAGS, use linker optimization flags in non-debug case,
# but moreover strip debug from libraries for which debuginfo is not wanted
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment