Add missing FlushCloseOutputFiles to CompileImage
Was causing DCHECK failure for gtest that generate app image. Test
is in followup CL.
Test: clean-oat-host && test-art-host
Bug: 34929159
Change-Id: Ie5db008a71a6313ff7dc749f7cc1ac21255efdd7
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;
}