Add a way to change the IMT size
Useful for having smaller imts on memory constrainted devices.
Setting ART_IMT_SIZE=x will change the size of the IMT.
(cherry picked from commit 8ee96437f8cd24e1eb0b2adc6cef3346ed4b6a98)
Change-Id: Ia74946ffc57ad32de5a8d60be3412462f19f8076
diff --git a/build/Android.common_build.mk b/build/Android.common_build.mk
index 7d34dae..c6e2b95 100644
--- a/build/Android.common_build.mk
+++ b/build/Android.common_build.mk
@@ -220,6 +220,14 @@
# -Wmissing-declarations \
+
+ifdef ART_IMT_SIZE
+ art_cflags += -DIMT_SIZE=$(ART_IMT_SIZE)
+else
+ # Default is 64
+ art_cflags += -DIMT_SIZE=64
+endif
+
ifeq ($(ART_SMALL_MODE),true)
art_cflags += -DART_SMALL_MODE=1
endif