Make it possible to change the read barrier type as build config.

Bug: 12687968
Change-Id: Ib43dab4d4e68a5a962347fcc2163c3100cb5b760
diff --git a/build/Android.common_build.mk b/build/Android.common_build.mk
index 288bddd..b507124 100644
--- a/build/Android.common_build.mk
+++ b/build/Android.common_build.mk
@@ -300,9 +300,17 @@
   art_asflags += -DART_HEAP_POISONING=1
 endif
 
+#
+# Used to change the read barrier type. Valid values are BAKER, BROOKS, TABLELOOKUP.
+# The default is BAKER.
+#
+ART_READ_BARRIER_TYPE ?= BAKER
+
 ifeq ($(ART_USE_READ_BARRIER),true)
   art_cflags += -DART_USE_READ_BARRIER=1
+  art_cflags += -DART_READ_BARRIER_TYPE_IS_$(ART_READ_BARRIER_TYPE)=1
   art_asflags += -DART_USE_READ_BARRIER=1
+  art_asflags += -DART_READ_BARRIER_TYPE_IS_$(ART_READ_BARRIER_TYPE)=1
 endif
 
 ifeq ($(ART_USE_TLAB),true)
@@ -392,7 +400,6 @@
 art_non_debug_cflags :=
 art_host_non_debug_cflags :=
 art_target_non_debug_cflags :=
-art_default_gc_type :=
 art_default_gc_type_cflags :=
 
 ART_HOST_LDLIBS :=