build: convert debug to Kconfig

Enabling debug will disable NDEBUG which will result in more debug
prints.  There are a number of debugging options for Xen so place the
debug option under a menu for different debugging options to have a way
to group them all together.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Doug Goldstein authored and Jan Beulich committed 2016-06-08 14:04:30 +02:00
1 parent 647fde4573
commit bacbf0cb73
4 files changed
+23 -2

No files matched your search

+2
View File
@@ -26,3 +26,5 @@ config DEFCONFIG_LIST
config EXPERT
string
option env="XEN_CONFIG_EXPERT"
source "Kconfig.debug"
+14
View File
@@ -0,0 +1,14 @@
menu "Debugging Options"
config DEBUG
bool "Developer Checks"
default y
---help---
If you say Y here this will enable developer checks such as asserts
and extra printks. This option is intended for development purposes
only, and not for production use.
You probably want to say 'N' here.
endmenu
+3 -2
View File
@@ -20,13 +20,14 @@ include $(XEN_ROOT)/Config.mk
ifeq ($(debug),y)
verbose := y
frame_pointer := y
else
CFLAGS += -DNDEBUG
endif
ifeq ($(perfc_arrays),y)
perfc := y
endif
ifeq ($(origin debug),command line)
$(warning "You must use 'make menuconfig' to enable/disable debug now.")
endif
ifneq ($(origin kexec),undefined)
$(error "You must use 'make menuconfig' to enable/disable kexec now.")
endif
+4
View File
@@ -81,4 +81,8 @@
/* allow existing code to work with Kconfig variable */
#define NR_CPUS CONFIG_NR_CPUS
#ifndef CONFIG_DEBUG
#define NDEBUG
#endif
#endif /* __XEN_CONFIG_H__ */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.