summaryrefslogtreecommitdiffstats
path: root/build/Android.common.mk
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2013-05-17 18:50:09 -0700
committerIan Rogers <irogers@google.com>2013-05-23 15:52:14 -0700
commitba3ce9a51651f3f3de2ecc82673b46762b1f2d9d (patch)
tree1358c21dc68f0f8e268c6c54a3f0297694bf6212 /build/Android.common.mk
parent790ad90ccd2f3e297e2cf0a47adbf4f9ffb10149 (diff)
downloadart-ba3ce9a51651f3f3de2ecc82673b46762b1f2d9d.zip
art-ba3ce9a51651f3f3de2ecc82673b46762b1f2d9d.tar.gz
art-ba3ce9a51651f3f3de2ecc82673b46762b1f2d9d.tar.bz2
Re-enable thread-safety checking on host, warn when not enabled.
Disable thread safety checks in the interpreter where template specialization is causing annotalysis issues. Change-Id: I178ea278a93a3eb90f386b3e02827b5c61ea0e52
Diffstat (limited to 'build/Android.common.mk')
-rw-r--r--build/Android.common.mk20
1 files changed, 13 insertions, 7 deletions
diff --git a/build/Android.common.mk b/build/Android.common.mk
index 508ff1b..f6a1300 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -62,13 +62,6 @@ art_cflags := \
-Wstrict-aliasing=3 \
-fstrict-aliasing
-# Enable thread-safety for GCC 4.6 but not for GCC 4.7 where this feature was removed.
-# Enable GCC 4.6 builds with 'export TARGET_GCC_VERSION_EXP=4.6'
-ifneq ($(filter 4.6 4.6.%, $(TARGET_GCC_VERSION)),)
- $(info Enabling thread-safety for GCC $(TARGET_GCC_VERSION))
- art_cflags += -Wthread-safety
-endif
-
ifeq ($(ART_SMALL_MODE),true)
art_cflags += -DART_SMALL_MODE=1
endif
@@ -108,6 +101,19 @@ else
ART_TARGET_CFLAGS += -DANDROID_SMP=0
endif
+# Enable thread-safety for GCC 4.6 on the target but not for GCC 4.7 where this feature was removed.
+ifneq ($(filter 4.6 4.6.%, $(TARGET_GCC_VERSION)),)
+ ART_TARGET_CFLAGS += -Wthread-safety
+else
+ # Warn if not using GCC 4.6 for target builds when not doing a top-level or 'mma' build.
+ ifneq ($(ONE_SHOT_MAKEFILE),)
+ # Enable target GCC 4.6 with: export TARGET_GCC_VERSION_EXP=4.6
+ $(info Using target GCC $(TARGET_GCC_VERSION) disables thread-safety checks.)
+ endif
+endif
+# We build with GCC 4.6 on the host.
+ART_HOST_CFLAGS += -Wthread-safety
+
# To use oprofile_android --callgraph, uncomment this and recompile with "mmm art -B -j16"
# ART_TARGET_CFLAGS += -fno-omit-frame-pointer -marm -mapcs