diff options
author | Mathieu Chartier <mathieuc@google.com> | 2018-01-18 20:06:00 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-01-18 20:06:00 +0000 |
commit | fbee440c1e166b51ba87ee40dcaf4f42bbae65a9 (patch) | |
tree | a93fc66e6c4a9be8c0d00da3ed4769e66519c842 | |
parent | 7be6b75686623f085699b6b2c58988a38e8b1f57 (diff) | |
parent | 156aa7cf8f3d4e9ddcea84e173332fb18e094e5f (diff) |
Merge "Add a way to specify compact dex level for dexlayout"
am: 156aa7cf8f
Change-Id: I0ae35566952486c5d63d6980a5eb15a154269cef
-rw-r--r-- | dexlayout/dexlayout_main.cc | 12 |
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; |