Make compiling an apex image explicit.
And when compiling an apex image, discard dex files not present
in an apex.
Test: m
Bug: 119800099
Change-Id: Ie91c5b8d271783f04e4c1501f315a3ec59137475
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index 5908b87..0ab5ff1 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -75,6 +75,7 @@
kNone, // JIT or AOT app compilation producing only an oat file but no image.
kBootImage, // Creating boot image.
kAppImage, // Creating app image.
+ kApexBootImage, // Creating the apex image for jit/zygote experiment b/119800099.
};
CompilerOptions();
@@ -210,7 +211,11 @@
// Are we compiling a boot image?
bool IsBootImage() const {
- return image_type_ == ImageType::kBootImage;
+ return image_type_ == ImageType::kBootImage || image_type_ == ImageType::kApexBootImage;
+ }
+
+ bool IsApexBootImage() const {
+ return image_type_ == ImageType::kApexBootImage;
}
bool IsBaseline() const {