diff options
author | 2015-06-25 10:01:47 +0100 | |
---|---|---|
committer | 2015-06-25 10:21:35 +0100 | |
commit | 335005e2b3a179f26b7a8ae64ca60a1406b669bd (patch) | |
tree | 7295902b386a8431cbf6c47596858a63add0281e /compiler/optimizing/optimizing_compiler.cc | |
parent | fdc9af0ed76aa1a6efa05b122c9bcfdbb7e1e991 (diff) |
Only do some checks when compiling against the core image.
This will avoid false negatives when running dex2oatd on apks.
bug:21865473
Change-Id: Id8eacaefae0bcf07a2ada8aedd7951854cdb5c4f
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 1944ba663a..1e515307b4 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -614,7 +614,8 @@ CompiledMethod* OptimizingCompiler::TryCompile(const DexFile::CodeItem* code_ite { PassScope scope(HGraphBuilder::kBuilderPassName, &pass_observer); if (!builder.BuildGraph(*code_item)) { - CHECK(!shouldCompile) << "Could not build graph in optimizing compiler"; + DCHECK(!(IsCompilingWithCoreImage() && shouldCompile)) + << "Could not build graph in optimizing compiler"; pass_observer.SetGraphInBadState(); return nullptr; } @@ -705,4 +706,9 @@ Compiler* CreateOptimizingCompiler(CompilerDriver* driver) { return new OptimizingCompiler(driver); } +bool IsCompilingWithCoreImage() { + const std::string& image = Runtime::Current()->GetImageLocation(); + return EndsWith(image, "core.art") || EndsWith(image, "core-optimizing.art"); +} + } // namespace art |