Add oat file generation and tests to build
- Currently builds boot.oat for host and target
and target oat files for art tests.
- Added cross compilation support via --strip-prefix option to dex2oat
- Reduced output to prevent build log spam (Compiler::verbose_)
- Added image roots for recovering important pointers on image load
- Redid JNI stub creation and made the stub array an image root
- Fixed JNI stub test by making JNI stub array executable
- Fixed JNI UnregisterNative to having it reinstall the JNI stub
- Fixed ARM JNI stub to generate PIC code (with irogers)
- Fixed JniCompiler to generate PIC code (with irogers)
- Fixed FindNativeMethod to handle recursive calls
- Finished checkFieldType to use Object::InstanceOf
- Fixed thread unsafe access to ClassLinker::{dex_files_,dex_caches_}
- Added ResolvedMethod variant for use with Method* for context
- Fixed ImageWriter to call FixupMethod
- Fixed ImageWriter to rewrite JNI stub references
- Improved error reporting on lack of ANDROID_DATA dir or art-cache dir
- Fixed Runtime::Start to InitLibraries before creating thread peer
- Implemented Space::IsCondemned to skip spaces loaded from images
- Implemented artFindInterfaceMethodInCache,
allowing interface invocation from managed code
Change-Id: I603e97fa0ac44508ae05a2e47c1cdb4481678d7b
diff --git a/src/common_test.h b/src/common_test.h
index fdea986..fefbbda 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -110,8 +110,10 @@
class_linker_ = runtime_->GetClassLinker();
#if defined(__i386__)
+ runtime_->SetJniStubArray(JniCompiler::CreateJniStub(kX86));
compiler_.reset(new Compiler(kX86));
#elif defined(__arm__)
+ runtime_->SetJniStubArray(JniCompiler::CreateJniStub(kThumb2));
compiler_.reset(new Compiler(kThumb2));
#endif
@@ -171,7 +173,7 @@
const DexFile* GetLibCoreDex() {
std::string libcore_dex_file_name = GetLibCoreDexFileName();
- return DexFile::OpenZip(libcore_dex_file_name);
+ return DexFile::OpenZip(libcore_dex_file_name, "");
}
uint32_t FindTypeIdxByDescriptor(const DexFile& dex_file, const StringPiece& descriptor) {
@@ -217,7 +219,7 @@
filename += "/system/framework/art-test-dex-";
filename += name;
filename += ".jar";
- const DexFile* dex_file = DexFile::OpenZip(filename);
+ const DexFile* dex_file = DexFile::OpenZip(filename, "");
CHECK(dex_file != NULL) << "Failed to open " << filename;
return dex_file;
}
@@ -247,6 +249,7 @@
void CompileMethod(Method* method) {
CHECK(method != NULL);
compiler_->CompileOne(method);
+ MakeExecutable(runtime_->GetJniStubArray());
MakeExecutable(method->GetCodeArray());
MakeExecutable(method->GetInvokeStubArray());
}