Enable dex diff check on debug builds.
Dex diff checks that the input and output dex files are equivalent at
the IR level. Normally enabled by passing -v to dexlayout, dex diff is
now enabled for debug builds as well.
Bug: 36107940
Test: mm test-art-host
Change-Id: I8c5ebb6a7cc0f699299a7200e8bc019762601feb
diff --git a/dexlayout/dexlayout.cc b/dexlayout/dexlayout.cc
index 9f7861f..205c0d1 100644
--- a/dexlayout/dexlayout.cc
+++ b/dexlayout/dexlayout.cc
@@ -1909,7 +1909,7 @@
}
// Do IR-level comparison between input and output. This check ignores potential differences
// due to layout, so offsets are not checked. Instead, it checks the data contents of each item.
- if (options_.verify_output_) {
+ if (kIsDebugBuild || options_.verify_output_) {
std::unique_ptr<dex_ir::Header> orig_header(dex_ir::DexIrBuilder(*dex_file));
CHECK(VerifyOutputDexFile(orig_header.get(), header_, &error_msg)) << error_msg;
}