mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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:
1 parent
647fde4573
commit
bacbf0cb73
4 files changed
+23
-2
No files matched your search
@@ -26,3 +26,5 @@ config DEFCONFIG_LIST
|
||||
config EXPERT
|
||||
string
|
||||
option env="XEN_CONFIG_EXPERT"
|
||||
|
||||
source "Kconfig.debug"
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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__ */
|
||||