Force Clang aarch64 builds to -O1.
Bug: http://b/23256622
Change-Id: Icab87964576f12a671e255500dec901f3558e7ad
diff --git a/build/Android.common_build.mk b/build/Android.common_build.mk
index 3d7b697..9f15294 100644
--- a/build/Android.common_build.mk
+++ b/build/Android.common_build.mk
@@ -275,6 +275,16 @@
-DVIXL_DEBUG \
-UNDEBUG
+# The latest clang update trips over many of the files in art and never finishes
+# compiling for aarch64 with -O3 (or -O2). Drop back to -O1 while we investigate
+# to stop punishing the build server.
+ifeq ($(TARGET_ARCH),arm64)
+ ifeq ($(USE_CLANG_PLATFORM_BUILD),true)
+ art_debug_cflags += -O1
+ art_non_debug_cflags += -O1
+ endif
+endif
+
art_host_non_debug_cflags := $(art_non_debug_cflags)
art_target_non_debug_cflags := $(art_non_debug_cflags)