[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2] xen: add DEBUG_INFO Kconfig symbol



Creating debug info during build is not strictly required at runtime.
Make it optional by introducing a new Kconfig knob "DEBUG_INFO".
This slightly reduces build time and diskusage, if disabled.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
 xen/Kconfig.debug | 7 +++++++
 xen/Rules.mk      | 5 ++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug
index 380c4e8d75..1d8c2c94a9 100644
--- a/xen/Kconfig.debug
+++ b/xen/Kconfig.debug
@@ -11,6 +11,13 @@ config DEBUG
 
          You probably want to say 'N' here.
 
+config DEBUG_INFO
+       bool "Compile Xen with debug info"
+       default y
+       ---help---
+         If you say Y here the resulting Xen will include debugging info
+         resulting in a larger binary image.
+
 if DEBUG || EXPERT = "y"
 
 config CRASH_DEBUG
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 47c954425d..47c5c694d6 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -55,7 +55,10 @@ endif
 
 CFLAGS += -nostdinc -fno-builtin -fno-common
 CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
-CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
+ifeq ($(CONFIG_DEBUG_INFO),y)
+CFLAGS += -g
+endif
+CFLAGS += -pipe -D__XEN__ -include $(BASEDIR)/include/xen/config.h
 CFLAGS += '-D__OBJECT_FILE__="$@"'
 
 ifneq ($(clang),y)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.