+comment 'Debugging Options'
+
+config DEBUG
+ bool "Build with debug information"
+ default n
+ help
+ Say Y here to compile with debug information.
+ This increases the size of the binary considerably, and
+ should only be used when doing development.
+
+ This adds -g option to gcc command line.
+
+ Most people should answer N.
+
+config DEBUG_PESSIMIZE
+ bool "Disable compiler optimizations"
+ default n
+ depends on DEBUG
+ help
+ The compiler's optimization of source code can eliminate and reorder
+ code, resulting in an executable that's hard to understand when
+ stepping through it with a debugger. This switches it off, resulting
+ in a much bigger executable that more closely matches the source
+ code.
+
+ This replaces -Os/-O2 with -O0 in gcc command line.
+
+config DEBUG_SANITIZE
+ bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)"
+ default n
+ help
+ Say Y here if you want to enable runtime sanitizers. These help
+ catch bad memory accesses (e.g. buffer overflows), but will make
+ the executable larger and slow down runtime a bit.
+
+ This adds -fsanitize=foo options to gcc command line.
+
+ If you aren't developing/testing busybox, say N here.
+
+config UNIT_TEST
+ bool "Build unit tests"
+ default n
+ help
+ Say Y here if you want to build unit tests (both the framework and
+ test cases) as an applet. This results in bigger code, so you
+ probably don't want this option in production builds.
+
+config WERROR
+ bool "Abort compilation on any warning"
+ default n
+ help
+ This adds -Werror to gcc command line.
+
+ Most people should answer N.
+
+config WARN_SIMPLE_MSG
+ bool "Warn about single parameter bb_xx_msg calls"
+ default n
+ help
+ This will cause warnings to be shown for any instances of
+ bb_error_msg(), bb_error_msg_and_die(), bb_perror_msg(),
+ bb_perror_msg_and_die(), bb_herror_msg() or bb_herror_msg_and_die()
+ being called with a single parameter. In these cases the equivalent
+ bb_simple_xx_msg function should be used instead.
+ Note that use of STRERROR_FMT may give false positives.
+
+ If you aren't developing busybox, say N here.
+
+choice
+ prompt "Additional debugging library"
+ default NO_DEBUG_LIB
+ help
+ Using an additional debugging library will make busybox become
+ considerably larger and will cause it to run more slowly. You
+ should always leave this option disabled for production use.
+
+ dmalloc support:
+ ----------------
+ This enables compiling with dmalloc ( http://dmalloc.com/ )
+ which is an excellent public domain mem leak and malloc problem
+ detector. To enable dmalloc, before running busybox you will
+ want to properly set your environment, for example:
+ export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
+ The 'debug=' value is generated using the following command
+ dmalloc -p log-stats -p log-non-free -p log-bad-space \
+ -p log-elapsed-time -p check-fence -p check-heap \
+ -p check-lists -p check-blank -p check-funcs -p realloc-copy \
+ -p allow-free-null
+
+ Electric-fence support:
+ -----------------------
+ This enables compiling with Electric-fence support. Electric
+ fence is another very useful malloc debugging library which uses
+ your computer's virtual memory hardware to detect illegal memory
+ accesses. This support will make busybox be considerably larger
+ and run slower, so you should leave this option disabled unless
+ you are hunting a hard to find memory problem.
+
+
+config NO_DEBUG_LIB
+ bool "None"
+
+config DMALLOC
+ bool "Dmalloc"
+
+config EFENCE
+ bool "Electric-fence"
+
+endchoice