Skip to contentSkip to conversation

-DNDEBUG for hypervisor only

PATCH New Ian Jackson 1 participant 1 message Jan 15, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 -DNDEBUG for hypervisor only

IMO in general use of -DNDEBUG to disable assert() is not good practice in userland code.

The attached patch applies this flag to the hypervisor only, by moving the setting from Config.mk to Rules.mk.

Ian.

Config.mk +1 -3
Index: xen-unstable.hg/Config.mk
===================================================================
@@ -57,9 +57,7 @@
     endif
 endef
 
-ifneq ($(debug),y)
-CFLAGS += -DNDEBUG
-else
+ifeq ($(debug),y)
 CFLAGS += -g
 endif
 
xen/Rules.mk +2 -0
Index: xen-unstable.hg/xen/Rules.mk
===================================================================
@@ -17,6 +17,8 @@
 ifeq ($(debug),y)
 verbose       := y
 frame_pointer := y
+else
+CFLAGS += -DNDEBUG
 endif
 ifeq ($(perfc_arrays),y)
 perfc := y

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel