Merge "bionic: allow the board to customize MALLOC_ALIGNMENT"
diff --git a/libc/Android.mk b/libc/Android.mk
index f7e0e8f..8e86d26 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -459,6 +459,13 @@
libc_common_cflags += -DDEBUG
endif
+# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
+# the appropriate BoardConfig.mk file.
+#
+ifneq ($(BOARD_MALLOC_ALIGNMENT),)
+ libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT)
+endif
+
ifeq ($(TARGET_ARCH),arm)
libc_common_cflags += -fstrict-aliasing
libc_crt_target_cflags := -mthumb-interwork