Make ClassLinker set Class::super_class_ plus test and build improvements
Create placeholder ClassLinker::java_lang_Object_ for use a
super-class of java_lang_Class_ instances.
src/class_linker.cc
src/class_linker.h
Expand ClassLinker FindClass test to verify Class::GetSuperClass
src/class_linker_test.cc
Move DexFile::Load* methods to ClassLinker so they can reference
java_lang_Object_ and java_lang_Class_
src/class_linker.cc
src/class_linker.h
src/dex_file.cc
src/dex_file.h
Move corresponding Load tests from class_linker_test to dex_file_test
src/class_linker_test.cc
src/dex_file_test.cc
Tracking change to object_test to use ClassLinker::Load* methods
src/object_test.cc
Move base64 to new src/common_test.h for reuse accross tests. Add
missing example source for MyClass dex.
src/common_test.h
src/class_linker_test.cc
src/dex_file_test.cc
src/object_test.cc
Change Heap::AllocClass to take DexFile argument
src/heap.h
Remove Method::dex_file_ in favor of using Method::GetClass::GetDexFile
src/object.cc
src/object.h
Made a few more RawDexFile methods const
src/raw_dex_file.cc
src/raw_dex_file.h
Add convenience targets for build-art and test-art-host
Android.mk
Drop use of _LOCAL_ from make variants, which isn't the appropriate
here, where we aren't differentiating between LOCAL_ and PRIVATE_.
Avoid redefinition of variables based on now removed
LIBART_TARGET_ARCH and TEST_TARGET_ARCH to support phony targets in
Android.mk
build/Android.aexec.host.mk
build/Android.aexec.mk
build/Android.common.mk
build/Android.libart.host.mk
build/Android.libart.mk
build/Android.test.host.mk
build/Android.test.mk
Change-Id: I84ce2b7a2b4e37799d4d782b97c02d5e97ac081c
diff --git a/build/Android.aexec.host.mk b/build/Android.aexec.host.mk
index a4d072e..6efc9e9 100644
--- a/build/Android.aexec.host.mk
+++ b/build/Android.aexec.host.mk
@@ -20,7 +20,7 @@
LOCAL_MODULE_TAGS := optional
include $(build_path)/Android.common.mk
-LOCAL_SRC_FILES := $(AEXEC_LOCAL_SRC_FILES)
+LOCAL_SRC_FILES := $(AEXEC_SRC_FILES)
LOCAL_C_INCLUDES :=
diff --git a/build/Android.aexec.mk b/build/Android.aexec.mk
index 2268cbf..411128e 100644
--- a/build/Android.aexec.mk
+++ b/build/Android.aexec.mk
@@ -20,7 +20,7 @@
LOCAL_MODULE_TAGS := optional
include $(build_path)/Android.common.mk
-LOCAL_SRC_FILES := $(AEXEC_LOCAL_SRC_FILES)
+LOCAL_SRC_FILES := $(AEXEC_SRC_FILES)
include external/stlport/libstlport.mk
LOCAL_C_INCLUDES +=
diff --git a/build/Android.common.mk b/build/Android.common.mk
index 30a63ca..bf442a3 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -35,10 +35,10 @@
LOCAL_CFLAGS +=
endif
-AEXEC_LOCAL_SRC_FILES := \
+AEXEC_SRC_FILES := \
src/main.cc
-LIBART_LOCAL_SRC_FILES := \
+LIBART_COMMON_SRC_FILES := \
src/assembler.cc \
src/base64.cc \
src/class_linker.cc \
@@ -52,28 +52,24 @@
src/stringpiece.cc \
src/thread.cc
-ifeq ($(LIBART_TARGET_ARCH),arm)
-LIBART_LOCAL_SRC_FILES += \
+LIBART_TARGET_SRC_FILES := \
+ $(LIBART_COMMON_SRC_FILES) \
src/assembler_arm.cc
-endif
-ifeq ($(LIBART_TARGET_ARCH),x86)
-LIBART_LOCAL_SRC_FILES += \
+LIBART_HOST_SRC_FILES := \
+ $(LIBART_COMMON_SRC_FILES) \
src/assembler_x86.cc
-endif
-TEST_LOCAL_SRC_FILES := \
+TEST_COMMON_SRC_FILES := \
src/class_linker_test.cc \
src/dex_file_test.cc \
src/dex_instruction_visitor_test.cc \
src/object_test.cc \
src/raw_dex_file_test.cc
-ifeq ($(TEST_TARGET_ARCH),arm)
-TEST_LOCAL_SRC_FILES +=
-endif
+TEST_TARGET_SRC_FILES := \
+ $(TEST_COMMON_SRC_FILES)
-ifeq ($(TEST_TARGET_ARCH),x86)
-TEST_LOCAL_SRC_FILES += \
+TEST_HOST_SRC_FILES := \
+ $(TEST_COMMON_SRC_FILES) \
src/assembler_x86_test.cc
-endif
diff --git a/build/Android.libart.host.mk b/build/Android.libart.host.mk
index cd13677..1612bf8 100644
--- a/build/Android.libart.host.mk
+++ b/build/Android.libart.host.mk
@@ -19,9 +19,8 @@
LOCAL_MODULE := libart
LOCAL_MODULE_TAGS := optional
-LIBART_TARGET_ARCH := $(HOST_ARCH)
include $(build_path)/Android.common.mk
-LOCAL_SRC_FILES := $(LIBART_LOCAL_SRC_FILES)
+LOCAL_SRC_FILES := $(LIBART_HOST_SRC_FILES)
LOCAL_WHOLE_STATIC_LIBRARIES := \
libcutils \
diff --git a/build/Android.libart.mk b/build/Android.libart.mk
index 404f0c6..e9dcfb6 100644
--- a/build/Android.libart.mk
+++ b/build/Android.libart.mk
@@ -19,9 +19,8 @@
LOCAL_MODULE := libart
LOCAL_MODULE_TAGS := optional
-LIBART_TARGET_ARCH := $(TARGET_ARCH)
include $(build_path)/Android.common.mk
-LOCAL_SRC_FILES := $(LIBART_LOCAL_SRC_FILES)
+LOCAL_SRC_FILES := $(LIBART_TARGET_SRC_FILES)
include external/stlport/libstlport.mk
diff --git a/build/Android.test.host.mk b/build/Android.test.host.mk
index 5c32a04..23346d9 100644
--- a/build/Android.test.host.mk
+++ b/build/Android.test.host.mk
@@ -18,7 +18,6 @@
local_module_tags := tests
-TEST_TARGET_ARCH := $(HOST_ARCH)
include $(build_path)/Android.common.mk
local_cpp_extension := $(LOCAL_CPP_EXTENSION)
local_cflags := $(LOCAL_CFLAGS)
@@ -33,7 +32,7 @@
libgtest_host \
libgtest_main_host
-$(foreach file,$(TEST_LOCAL_SRC_FILES), \
+$(foreach file,$(TEST_HOST_SRC_FILES), \
$(eval include $(CLEAR_VARS)) \
$(eval LOCAL_CPP_EXTENSION := $(local_cpp_extension)) \
$(eval LOCAL_MODULE := $(notdir $(file:%.cc=%))) \
diff --git a/build/Android.test.mk b/build/Android.test.mk
index fc3917c..7d7b2ce 100644
--- a/build/Android.test.mk
+++ b/build/Android.test.mk
@@ -18,7 +18,6 @@
local_module_tags := tests
-TEST_TARGET_ARCH := $(TARGET_ARCH)
include $(build_path)/Android.common.mk
local_cpp_extension := $(LOCAL_CPP_EXTENSION)
local_cflags := $(LOCAL_CFLAGS)
@@ -34,7 +33,7 @@
libgtest \
libgtest_main
-$(foreach file,$(TEST_LOCAL_SRC_FILES), \
+$(foreach file,$(TEST_TARGET_SRC_FILES), \
$(eval include $(CLEAR_VARS)) \
$(eval LOCAL_CPP_EXTENSION := $(local_cpp_extension)) \
$(eval LOCAL_MODULE := $(notdir $(file:%.cc=%))) \