ART: Change CmdlineMain/Args behavior
Do not initialize the instruction set to the runtime ISA immediately.
Instead, print a warning late if we fall back to the runtime ISA. This
change improves the understanding of what our tools are doing.
Bug: 66984877
Test: m test-art-host
Change-Id: Ib87485ffb81f721cc27797ceaf88cb5d763422bf
diff --git a/imgdiag/imgdiag.cc b/imgdiag/imgdiag.cc
index d3b8ce1..f0c9158 100644
--- a/imgdiag/imgdiag.cc
+++ b/imgdiag/imgdiag.cc
@@ -1715,7 +1715,7 @@
*error_msg = StringPrintf("Failed to check process status: %s", strerror(errno));
}
return kParseError;
- } else if (instruction_set_ != kRuntimeISA) {
+ } else if (instruction_set_ != InstructionSet::kNone && instruction_set_ != kRuntimeISA) {
// Don't allow different ISAs since the images are ISA-specific.
// Right now the code assumes both the runtime ISA and the remote ISA are identical.
*error_msg = "Must use the default runtime ISA; changing ISA is not supported.";