Add new dexopt flag to control CompactDex generation

Add a new flag to control CompactDex generation, this allows more
flexibility regarding when compact dex is generated.

The goal is to generate it for cmd package compile.

Bug: 63756964
Bug: 74245837
Test: adb shell /data/nativetest64/installd_dexopt_test/installd_dexopt_test

(cherry picked from commit f69c2f7f64e873049f66cfbed1aaad539bf0e063)

Merged-In: I0674f50bbb7413b67e6fbab3199f5c7e78ec875c
Change-Id: I8ed2e41ab94960ca8ac75008a74d5abd14e9ec97
diff --git a/cmds/installd/otapreopt.cpp b/cmds/installd/otapreopt.cpp
index c1a1202..58355f9 100644
--- a/cmds/installd/otapreopt.cpp
+++ b/cmds/installd/otapreopt.cpp
@@ -81,8 +81,9 @@
 static_assert(DEXOPT_STORAGE_DE     == 1 << 8, "DEXOPT_STORAGE_DE unexpected.");
 static_assert(DEXOPT_ENABLE_HIDDEN_API_CHECKS == 1 << 10,
         "DEXOPT_ENABLE_HIDDEN_API_CHECKS unexpected");
+static_assert(DEXOPT_GENERATE_COMPACT_DEX == 1 << 11, "DEXOPT_GENERATE_COMPACT_DEX unexpected");
 
-static_assert(DEXOPT_MASK           == (0x5fe | DEXOPT_IDLE_BACKGROUND_JOB),
+static_assert(DEXOPT_MASK           == (0xdfe | DEXOPT_IDLE_BACKGROUND_JOB),
               "DEXOPT_MASK unexpected.");