summaryrefslogtreecommitdiff
path: root/compiler/image_test.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2014-07-12 03:08:24 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-07-11 21:38:38 +0000
commit0ee33c32388f49853b7f7003047047d7f9e9cb75 (patch)
tree8113de95a8ccdbc6fb854edd0cadef8f852c7dee /compiler/image_test.cc
parent8c4728186f038e2ae09e74cbdcef5e5ca598ba64 (diff)
parent22f8e5c82d12951be38cd893426e13bee33fd69d (diff)
Merge "Revert "Revert "ART: Key-Value Store in Oat header"""
Diffstat (limited to 'compiler/image_test.cc')
-rw-r--r--compiler/image_test.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/compiler/image_test.cc b/compiler/image_test.cc
index d52ec0ad5a..6b2698085c 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(),
@@ -138,6 +142,9 @@ TEST_F(ImageTest, WriteRead) {
std::string image("-Ximage:");
image.append(image_location.GetFilename());
options.push_back(std::make_pair(image.c_str(), reinterpret_cast<void*>(NULL)));
+ // Turn off implicit checks for this runtime, as we compiled the image with them off.
+ std::string explicit_checks("-implicit-checks:none");
+ options.push_back(std::make_pair(explicit_checks.c_str(), reinterpret_cast<void*>(NULL)));
if (!Runtime::Create(options, false)) {
LOG(FATAL) << "Failed to create runtime";