Add option to append to the cfg dump.

This makes life easier when verifying tests with unresolved classes
(which call dex2oat at rutime).

Change-Id: I7985b2b7c0f343462e03a26b8395297c810b1d95
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index f9520be..68e2ef5 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -523,6 +523,7 @@
       dump_passes_(false),
       dump_timing_(false),
       dump_slow_timing_(kIsDebugBuild),
+      dump_cfg_append_(false),
       swap_fd_(-1),
       timings_(timings) {}
 
@@ -1096,6 +1097,8 @@
         dump_passes_ = true;
       } else if (option.starts_with("--dump-cfg=")) {
         dump_cfg_file_name_ = option.substr(strlen("--dump-cfg=")).data();
+      } else if (option.starts_with("--dump-cfg-append")) {
+        dump_cfg_append_ = true;
       } else if (option == "--dump-stats") {
         dump_stats_ = true;
       } else if (option == "--generate-debug-info" || option == "-g") {
@@ -1474,6 +1477,7 @@
                                      dump_stats_,
                                      dump_passes_,
                                      dump_cfg_file_name_,
+                                     dump_cfg_append_,
                                      compiler_phases_timings_.get(),
                                      swap_fd_,
                                      profile_file_));
@@ -1982,6 +1986,7 @@
   bool dump_timing_;
   bool dump_slow_timing_;
   std::string dump_cfg_file_name_;
+  bool dump_cfg_append_;
   std::string swap_file_name_;
   int swap_fd_;
   std::string profile_file_;  // Profile file to use