Bring our native stack usage down.
I'd have preferred to have a 512-byte limit, but there are some monsters
in the verifier; 2000-line functions and the like. I'm also not policing
tests (except for one silly one). They can use all the stack they like.
This fixes the IntMath test (the stack overflow test was failing because
we were using more than 4KiB to throw!).
Change-Id: I7e53e2fde2b39fde1910f8ee5b1712e8a66069c7
diff --git a/build/Android.common.mk b/build/Android.common.mk
index f72db43..d3f10f3 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -44,6 +44,12 @@
-fno-align-jumps \
-fstrict-aliasing
+art_non_debug_cflags := \
+ -Wframe-larger-than=1728
+
+art_debug_cflags := \
+ -UNDEBUG
+
ART_HOST_CFLAGS := $(art_cflags) -DANDROID_SMP=1
ART_TARGET_CFLAGS := $(art_cflags)
@@ -53,7 +59,9 @@
ART_TARGET_CFLAGS += -DANDROID_SMP=0
endif
-art_debug_cflags := -UNDEBUG
+ART_HOST_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
+ART_TARGET_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
+
# TODO: move -fkeep-inline-functions to art_debug_cflags when target gcc > 4.4
ART_HOST_DEBUG_CFLAGS := $(art_debug_cflags) -fkeep-inline-functions
ART_TARGET_DEBUG_CFLAGS := $(art_debug_cflags)