Merge "Add missing FlushCloseOutputFiles to CompileImage"
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index be75628..dbae70e 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -2821,6 +2821,9 @@
 
   // When given --host, finish early without stripping.
   if (dex2oat.IsHost()) {
+    if (!dex2oat.FlushCloseOutputFiles()) {
+      return EXIT_FAILURE;
+    }
     dex2oat.DumpTiming();
     return EXIT_SUCCESS;
   }