summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2018-10-29 15:02:21 -0700
committer android-build-merger <android-build-merger@google.com> 2018-10-29 15:02:21 -0700
commite3ad8bc346e4f6a880d7dd18f4facca9580dfbbc (patch)
treea0e4d38500b570379da0c465574e0aa2224a3b53
parentc688c0f98fb9ccda3e93a470d7fbcab03cfde7d2 (diff)
parent16eae49bd94738616fbda0c1d23eeb3e49fd7856 (diff)
Merge "Add dalvik.vm.dex2oat-resolve-startup-strings feature flag" am: 692bc1f89c
am: 16eae49bd9 Change-Id: Ifc00abfa474a7903464ad98be3698cf4d8e8d56e
-rw-r--r--cmds/installd/dexopt.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp
index 66dece740a..174ab21658 100644
--- a/cmds/installd/dexopt.cpp
+++ b/cmds/installd/dexopt.cpp
@@ -287,6 +287,8 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd
(strcmp(vold_decrypt, "1") == 0)));
bool generate_debug_info = property_get_bool("debug.generate-debug-info", false);
+ const bool resolve_startup_strings =
+ property_get_bool("dalvik.vm.dex2oat-resolve-startup-strings", false);
char app_image_format[kPropertyValueMax];
char image_format_arg[strlen("--image-format=") + kPropertyValueMax];
@@ -442,7 +444,7 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd
// supported.
const bool disable_cdex = !generate_compact_dex || (input_vdex_fd == output_vdex_fd);
- const char* argv[9 // program name, mandatory arguments and the final NULL
+ const char* argv[10 // program name, mandatory arguments and the final NULL
+ (have_dex2oat_isa_variant ? 1 : 0)
+ (have_dex2oat_isa_features ? 1 : 0)
+ (have_dex2oat_Xms_flag ? 2 : 0)
@@ -475,6 +477,8 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd
argv[i++] = oat_fd_arg;
argv[i++] = oat_location_arg;
argv[i++] = instruction_set_arg;
+ argv[i++] = resolve_startup_strings ? "--resolve-startup-const-strings=true" :
+ "--resolve-startup-const-strings=false";
if (have_dex2oat_isa_variant) {
argv[i++] = instruction_set_variant_arg;
}