diff options
author | Lubos Lunak <l.lunak@suse.cz> | 2012-10-19 12:47:37 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-10-22 14:56:19 +0200 |
commit | a0320a908875f42bab9983ffe4db5b49fe7ba2f6 (patch) | |
tree | f873ecd25090bdaed929fb4d67e4cac09b1f118f /solenv/gbuild/Module.mk | |
parent | 920807d4491834cd88e545fdb930c9105d58c4cd (diff) |
clean up configure options for debugging build
By default a product (non-developer) build is done. Code is optimized and no debugging
information is included (may be overriden though, see below).
Developers should preferably build with --enable-dbgutil , or at least --enable-debug.
The --enable-symbols switch has been removed. Use explicit CFLAGS/CXXFLAGS/LDFLAGS instead
if needed.
With --enable-debug optimizations are turned off and debugging information is included
(in order to make it possible to examine the code in a debugger). Additionally assertions
and logging is enabled (see SAL_WARN/SAL_INFO documentation for details and better control).
This switch should primarily by used for occassional development (such as when it is needed
to debug one module in a non-debug build, see also 'make DEBUG=true' below).
Using --enable-dbgutil is the recommended developer option. In addition to --enable-debug
it also enables additional checks, such as debugging mode for STL or checking compiler
plugins. This switch may also enable additional logging from obsolete debugging tools
(which should be converted to SAL_WARN/SAL_INFO for better control). Note that this option
makes the build binary incompatible from a --disable-dbgutil build, so it is not possible
to mix them.
When using --enable-debug/--enable-dbgutil , the build is noticeably larger because of the included
debugging information (compiler -g option). When disk space is an issue (or the computer
is not very powerful), the --enable-selective-debuginfo option allow specifying where
the debugging information should or should not be used. The option takes a list of arguments,
where all means everything, - prepended means not to enable, / appended means everything
in the directory; there is no ordering, more specific overrides more general,
and disabling takes precedence). For example, --enable-selective-debuginfo="all -sw/ -Library_sc"
enables debugginfo for everything except for anything in the sw module and the sc library.
Explicitly specified CFLAGS/CXXFLAGS/LDFLAGS override optimization and debugging options
(can be now also passed to configure which will make the build system use them).
If in a non-debug build it is needed to temporary build something as a debug build,
'make DEBUG=true' temporarily works as if --enable-debug was specified. It also temporarily
overrides debuginfo disabled using --enable-selective-debuginfo.
Old code using old logging functionality also has a concept of a debug level, forced using
'make DBGLEVEL=2'. Using a debug level of 2 (or higher) enables additional logging output.
New code should use SAL_WARN/SAL_INFO and use extra areas for additional logging output
that can be selectively enabled/disabled using SAL_LOG variable.
(Some smaller parts of this design will be implemented by separate follow-up commits.)
Change-Id: Ia6420ee3c99c217ead648e8967165eed7f632258
Diffstat (limited to 'solenv/gbuild/Module.mk')
-rw-r--r-- | solenv/gbuild/Module.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk index 17fc857e81dc..97f1a81262a0 100644 --- a/solenv/gbuild/Module.mk +++ b/solenv/gbuild/Module.mk @@ -190,8 +190,8 @@ showmodules : # enable if: no "-MODULE/" defined AND ["all" defined OR "MODULE/" defined] gb_Module__debug_enabled = \ - $(and $(if $(filter -$(1)/,$(ENABLE_DEBUG_FOR)),,$(true)),\ - $(filter all $(1)/,$(ENABLE_DEBUG_FOR))) + $(and $(if $(filter -$(1)/,$(ENABLE_DEBUGINFO_FOR)),,$(true)),\ + $(filter all $(1)/,$(ENABLE_DEBUGINFO_FOR))) define gb_Module_Module gb_Module_ALLMODULES += $(1) |