diff options
| author | 2014-06-26 16:11:07 -0700 | |
|---|---|---|
| committer | 2014-07-08 12:14:38 -0700 | |
| commit | c87d27b25994da8670d82a8f7bad6327b693bfff (patch) | |
| tree | e8ad0fa224f050c5c3e3e30ccdc0912f28650f42 /compiler/image_test.cc | |
| parent | e8a30f37bf1530a80a7df17692dbe7a68764ac30 (diff) | |
ART: Key-Value Store in Oat header
Allows the storage of string-string pairs in the oat header. The
first significant use of this is storing the implicit-check flags,
so that an oat file can be rejected if it doesn't agree with the
current runtime.
Bump the oat version as the header structure changes.
Change-Id: I15a1c16886e6b8fa7b881c918c19c1efa5c7c00f
Diffstat (limited to 'compiler/image_test.cc')
| -rw-r--r-- | compiler/image_test.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/image_test.cc b/compiler/image_test.cc index d52ec0ad5a..406d9d2696 100644 --- a/compiler/image_test.cc +++ b/compiler/image_test.cc @@ -25,6 +25,7 @@ #include "compiler/image_writer.h" #include "compiler/oat_writer.h" #include "gc/space/image_space.h" +#include "implicit_check_options.h" #include "lock_word.h" #include "mirror/object-inl.h" #include "signal_catcher.h" @@ -77,8 +78,11 @@ TEST_F(ImageTest, WriteRead) { t.NewTiming("WriteElf"); ScopedObjectAccess soa(Thread::Current()); - OatWriter oat_writer(class_linker->GetBootClassPath(), - 0, 0, "", compiler_driver_.get(), &timings); + SafeMap<std::string, std::string> key_value_store; + key_value_store.Put(ImplicitCheckOptions::kImplicitChecksOatHeaderKey, + ImplicitCheckOptions::Serialize(true, true, true)); + OatWriter oat_writer(class_linker->GetBootClassPath(), 0, 0, compiler_driver_.get(), &timings, + &key_value_store); bool success = compiler_driver_->WriteElf(GetTestAndroidRoot(), !kIsTargetBuild, class_linker->GetBootClassPath(), |