Add application image dex2oat options
Bug: 22858531
Change-Id: Ia6a2a832b20b5bb70672521cd06f679335efbd92
diff --git a/compiler/image_writer.h b/compiler/image_writer.h
index e235bc4..7a2febc 100644
--- a/compiler/image_writer.h
+++ b/compiler/image_writer.h
@@ -41,6 +41,8 @@
namespace art {
+static constexpr int kInvalidImageFd = -1;
+
// Write a Space built during compilation for use during execution.
class ImageWriter FINAL {
public:
@@ -89,7 +91,11 @@
uint8_t* GetOatFileBegin() const;
- bool Write(const std::string& image_filename, const std::string& oat_filename,
+ // If image_fd is not kInvalidImageFd, then we use that for the file. Otherwise we open
+ // image_filename.
+ bool Write(int image_fd,
+ const std::string& image_filename,
+ const std::string& oat_filename,
const std::string& oat_location)
REQUIRES(!Locks::mutator_lock_);