Fix assert handling for LLVM.
If we undefined NDEBUG first, the system-wide -DNDEBUG will override it, thus
causing asserts to still remain off.
Change-Id: I84342ca36595bbd7e310ea19c6907938fba4cee7
diff --git a/llvm-device-build.mk b/llvm-device-build.mk
index 156a39b..30baec0 100644
--- a/llvm-device-build.mk
+++ b/llvm-device-build.mk
@@ -27,9 +27,9 @@
ifeq ($(LLVM_ENABLE_ASSERTION),true)
LOCAL_CFLAGS := \
+ $(LOCAL_CFLAGS) \
-D_DEBUG \
- -UNDEBUG \
- $(LOCAL_CFLAGS)
+ -UNDEBUG
endif
ifneq ($(REQUIRES_EH),1)
diff --git a/llvm-host-build.mk b/llvm-host-build.mk
index 67c3808..9fd7435 100644
--- a/llvm-host-build.mk
+++ b/llvm-host-build.mk
@@ -13,9 +13,9 @@
ifeq ($(LLVM_ENABLE_ASSERTION),true)
LOCAL_CFLAGS := \
+ $(LOCAL_CFLAGS) \
-D_DEBUG \
- -UNDEBUG \
- $(LOCAL_CFLAGS)
+ -UNDEBUG
endif
ifneq ($(REQUIRES_EH),1)