Ignore image checksum for ExtractOnly oat files
Oat files compiled with --compiler-filter=verify-at-runtime contain
no compiled code and therefore are independent of the boot image.
This patch stores an ExtractOnly flag in the oat header and skips
the image checksum test if the flag is set, rendering the oat file
up to date even after OTAs.
Bug: 26813999
Change-Id: I25291d5b49d9e9d0018844e957a2dc88ef6bdc27
diff --git a/runtime/oat.h b/runtime/oat.h
index 989e3f9..fde386f 100644
--- a/runtime/oat.h
+++ b/runtime/oat.h
@@ -38,6 +38,7 @@
static constexpr const char* kDex2OatHostKey = "dex2oat-host";
static constexpr const char* kPicKey = "pic";
static constexpr const char* kDebuggableKey = "debuggable";
+ static constexpr const char* kExtractOnlyKey = "extract-only";
static constexpr const char* kClassPathKey = "classpath";
static constexpr const char* kBootClassPath = "bootclasspath";
@@ -106,6 +107,7 @@
size_t GetHeaderSize() const;
bool IsPic() const;
bool IsDebuggable() const;
+ bool IsExtractOnly() const;
private:
OatHeader(InstructionSet instruction_set,