All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xen: add DEBUG_INFO Kconfig symbol
@ 2018-08-31  8:29 Olaf Hering
  2018-08-31  8:32 ` Wei Liu
  2018-08-31  8:43 ` Jan Beulich
  0 siblings, 2 replies; 15+ messages in thread
From: Olaf Hering @ 2018-08-31  8:29 UTC (permalink / raw)
  To: xen-devel
  Cc: Olaf Hering, Stefano Stabellini, Wei Liu, George Dunlap,
	Andrew Cooper, Ian Jackson, Tim Deegan, Julien Grall, Jan Beulich

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@aepfle.de>
---
 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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-09-11  7:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-31  8:29 [PATCH v2] xen: add DEBUG_INFO Kconfig symbol Olaf Hering
2018-08-31  8:32 ` Wei Liu
2018-08-31  8:38   ` Olaf Hering
2018-08-31  8:41   ` Jan Beulich
2018-08-31  8:51     ` Andrew Cooper
2018-08-31  8:52       ` Wei Liu
2018-08-31  8:43 ` Jan Beulich
2018-08-31  9:02   ` Olaf Hering
2018-08-31  9:25     ` Jan Beulich
2018-08-31  9:50       ` Julien Grall
2018-08-31 10:40         ` Jan Beulich
2018-09-10 13:21   ` Jan Beulich
2018-09-10 13:29     ` Jan Beulich
2018-09-10 17:51       ` Andrew Cooper
2018-09-11  7:58         ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.