Merge "Fixes to make all run-tests except 051-thread work." into dalvik-dev
diff --git a/build/Android.libart-compiler.mk b/build/Android.libart-compiler.mk
index 3d12527..8084be2 100644
--- a/build/Android.libart-compiler.mk
+++ b/build/Android.libart-compiler.mk
@@ -14,7 +14,7 @@
# limitations under the License.
#
-LIBART_COMPILER_COMMON_SRC_FILES += \
+LIBART_COMPILER_SRC_FILES += \
src/compiler/dataflow.cc \
src/compiler/frontend.cc \
src/compiler/ralloc.cc \
@@ -55,20 +55,10 @@
src/compiler/codegen/x86/int_x86.cc \
src/oat/jni/arm/jni_internal_arm.cc \
src/oat/jni/mips/jni_internal_mips.cc \
- src/oat/jni/x86/jni_internal_x86.cc \
-
-LIBART_COMPILER_arm_SRC_FILES += \
- $(LIBART_COMPILER_COMMON_SRC_FILES)
-
-LIBART_COMPILER_mips_SRC_FILES += \
- $(LIBART_COMPILER_COMMON_SRC_FILES)
-
-LIBART_COMPILER_x86_SRC_FILES += \
- $(LIBART_COMPILER_COMMON_SRC_FILES)
+ src/oat/jni/x86/jni_internal_x86.cc
# $(1): target or host
# $(2): ndebug or debug
-# $(3): architecture name
define build-libart-compiler
ifneq ($(1),target)
ifneq ($(1),host)
@@ -83,7 +73,6 @@
art_target_or_host := $(1)
art_ndebug_or_debug := $(2)
- libart_compiler_arch := $(3)
include $(CLEAR_VARS)
ifeq ($$(art_target_or_host),target)
@@ -91,15 +80,15 @@
endif
LOCAL_CPP_EXTENSION := $(ART_CPP_EXTENSION)
ifeq ($$(art_ndebug_or_debug),ndebug)
- LOCAL_MODULE := libart-compiler-$$(libart_compiler_arch)
+ LOCAL_MODULE := libart-compiler
else # debug
- LOCAL_MODULE := libartd-compiler-$$(libart_compiler_arch)
+ LOCAL_MODULE := libartd-compiler
endif
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
- LOCAL_SRC_FILES := $$(LIBART_COMPILER_$$(libart_compiler_arch)_SRC_FILES)
+ LOCAL_SRC_FILES := $$(LIBART_COMPILER_SRC_FILES)
ifeq ($$(art_target_or_host),target)
LOCAL_CFLAGS := $(ART_TARGET_CFLAGS)
@@ -128,11 +117,6 @@
endif
LOCAL_SHARED_LIBRARIES += libbcc
- # TODO: temporary hack for testing.
- ifeq ($$(libart_compiler_arch),mips)
- LOCAL_CFLAGS += -D__mips_hard_float
- endif
-
ifeq ($(ART_USE_PORTABLE_COMPILER),true)
ART_TEST_CFLAGS += -DART_USE_PORTABLE_COMPILER=1
endif
@@ -173,21 +157,15 @@
endef
-# $(1): target or host
-# $(2): ndebug or debug
-define build-libart-compilers
- $(foreach arch,arm mips x86,$(eval $(call build-libart-compiler,$(1),$(2),$(arch))))
-endef
-
ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
- $(eval $(call build-libart-compiler,target,ndebug,$(TARGET_ARCH)))
+ $(eval $(call build-libart-compiler,target,ndebug))
endif
ifeq ($(ART_BUILD_TARGET_DEBUG),true)
- $(eval $(call build-libart-compiler,target,debug,$(TARGET_ARCH)))
+ $(eval $(call build-libart-compiler,target,debug))
endif
ifeq ($(ART_BUILD_HOST_NDEBUG),true)
- $(eval $(call build-libart-compilers,host,ndebug))
+ $(eval $(call build-libart-compiler,host,ndebug))
endif
ifeq ($(ART_BUILD_HOST_DEBUG),true)
- $(eval $(call build-libart-compilers,host,debug))
+ $(eval $(call build-libart-compiler,host,debug))
endif
diff --git a/src/compiler.cc b/src/compiler.cc
index 818b412..522b8c8 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -232,18 +232,7 @@
DISALLOW_COPY_AND_ASSIGN(AOTCompilationStats);
};
-static std::string MakeCompilerSoName(CompilerBackend compiler_backend, InstructionSet instruction_set) {
- // TODO: is the ARM/Thumb2 instruction set distinction really buying us anything,
- // or just causing hassle like this?
- if (instruction_set == kThumb2) {
- instruction_set = kArm;
- }
-
- // Lower case the instruction set, because that's what we do in the build system.
- std::string instruction_set_name(ToStr<InstructionSet>(instruction_set).str());
- for (size_t i = 0; i < instruction_set_name.size(); ++i) {
- instruction_set_name[i] = tolower(instruction_set_name[i]);
- }
+static std::string MakeCompilerSoName(CompilerBackend compiler_backend) {
// Bad things happen if we pull in the libartd-compiler to a libart dex2oat or vice versa,
// because we end up with both libart and libartd in the same address space!
@@ -254,7 +243,7 @@
if ((compiler_backend == kPortable) || (compiler_backend == kIceland)) {
library_name = StringPrintf("art%s-compiler-llvm", suffix);
} else {
- library_name = StringPrintf("art%s-compiler-%s", suffix, instruction_set_name.c_str());
+ library_name = StringPrintf("art%s-compiler", suffix);
}
std::string filename(StringPrintf(OS_SHARED_LIB_FORMAT_STR, library_name.c_str()));
@@ -314,7 +303,7 @@
jni_compiler_(NULL),
create_invoke_stub_(NULL)
{
- std::string compiler_so_name(MakeCompilerSoName(compiler_backend_, instruction_set_));
+ std::string compiler_so_name(MakeCompilerSoName(compiler_backend_));
compiler_library_ = dlopen(compiler_so_name.c_str(), RTLD_LAZY);
if (compiler_library_ == NULL) {
LOG(FATAL) << "Couldn't find compiler library " << compiler_so_name << ": " << dlerror();
@@ -402,7 +391,7 @@
}
CHECK_PTHREAD_CALL(pthread_key_delete, (tls_key_), "delete tls key");
typedef void (*UninitCompilerContextFn)(Compiler&);
- std::string compiler_so_name(MakeCompilerSoName(compiler_backend_, instruction_set_));
+ std::string compiler_so_name(MakeCompilerSoName(compiler_backend_));
UninitCompilerContextFn uninit_compiler_context;
// Uninitialize compiler_context_
// TODO: rework to combine initialization/uninitialization
@@ -1753,8 +1742,7 @@
typedef void (*SetBitcodeFileNameFn)(Compiler&, std::string const&);
SetBitcodeFileNameFn set_bitcode_file_name =
- FindFunction<SetBitcodeFileNameFn>(MakeCompilerSoName(compiler_backend_, instruction_set_),
- compiler_library_,
+ FindFunction<SetBitcodeFileNameFn>(MakeCompilerSoName(compiler_backend_), compiler_library_,
"compilerLLVMSetBitcodeFileName");
set_bitcode_file_name(*this, filename);