summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2015-10-14 16:21:17 -0700
committer Alex Light <allight@google.com> 2015-10-14 23:26:59 +0000
commit8069d9f1b587fef93252cd5135f59c038302f7fb (patch)
tree497603f4f17826be94d123d75fa787172a76a1b1
parent08583a096adb04e57b7b57ba4d87b006582e7ee9 (diff)
Allow changing the optimization level of a build with env variable.
This is useful for debugging. Change-Id: I60e61cdb53a00d74cf619d56991f9d11ab9ae0c4
-rw-r--r--build/Android.common_build.mk8
1 files changed, 6 insertions, 2 deletions
diff --git a/build/Android.common_build.mk b/build/Android.common_build.mk
index b50712429e..b3d246cba3 100644
--- a/build/Android.common_build.mk
+++ b/build/Android.common_build.mk
@@ -34,6 +34,10 @@ ART_BUILD_TARGET_DEBUG ?= true
ART_BUILD_HOST_NDEBUG ?= true
ART_BUILD_HOST_DEBUG ?= true
+# Set this to change what opt level Art is built at.
+ART_DEBUG_OPT_FLAG ?= -O2
+ART_NDEBUG_OPT_FLAG ?= -O3
+
# Enable the static builds only for checkbuilds.
ifneq (,$(filter checkbuild,$(MAKECMDGOALS)))
ART_BUILD_HOST_STATIC ?= true
@@ -319,11 +323,11 @@ endif
# Cflags for non-debug ART and ART tools.
art_non_debug_cflags := \
- -O3
+ $(ART_NDEBUG_OPT_FLAG)
# Cflags for debug ART and ART tools.
art_debug_cflags := \
- -O2 \
+ $(ART_DEBUG_OPT_FLAG) \
-DDYNAMIC_ANNOTATIONS_ENABLED=1 \
-DVIXL_DEBUG \
-UNDEBUG