summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2018-01-18 19:56:38 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-01-18 19:56:38 +0000
commit156aa7cf8f3d4e9ddcea84e173332fb18e094e5f (patch)
treea93fc66e6c4a9be8c0d00da3ed4769e66519c842
parent1458841cc3eb725f5fb519036abc2c688135f78f (diff)
parent5c362202a6c82fff6b7052a53e6fe13e8fc9ad08 (diff)
Merge "Add a way to specify compact dex level for dexlayout"
-rw-r--r--dexlayout/dexlayout_main.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/dexlayout/dexlayout_main.cc b/dexlayout/dexlayout_main.cc
index 5bb7196531..83fb99a734 100644
--- a/dexlayout/dexlayout_main.cc
+++ b/dexlayout/dexlayout_main.cc
@@ -62,6 +62,7 @@ static void Usage(void) {
fprintf(stderr, " -t : display file section sizes\n");
fprintf(stderr, " -v : verify output file is canonical to input (IR level comparison)\n");
fprintf(stderr, " -w : output dex directory \n");
+ fprintf(stderr, " -x : compact dex generation level, either 'none' or 'fast'\n");
}
/*
@@ -79,7 +80,7 @@ int DexlayoutDriver(int argc, char** argv) {
// Parse all arguments.
while (1) {
- const int ic = getopt(argc, argv, "abcdefghil:mo:p:stvw:");
+ const int ic = getopt(argc, argv, "abcdefghil:mo:p:stvw:x:");
if (ic < 0) {
break; // done
}
@@ -141,6 +142,15 @@ int DexlayoutDriver(int argc, char** argv) {
case 'w': // output dex files directory
options.output_dex_directory_ = optarg;
break;
+ case 'x': // compact dex level
+ if (strcmp(optarg, "none") == 0) {
+ options.compact_dex_level_ = CompactDexLevel::kCompactDexLevelNone;
+ } else if (strcmp(optarg, "fast") == 0) {
+ options.compact_dex_level_ = CompactDexLevel::kCompactDexLevelFast;
+ } else {
+ want_usage = true;
+ }
+ break;
default:
want_usage = true;
break;