diff options
| author | 2015-06-25 10:01:47 +0100 | |
|---|---|---|
| committer | 2015-06-25 10:48:38 +0100 | |
| commit | 20d60dd249e07a17351427770f0e0f6c68945b7a (patch) | |
| tree | 98c99d1cf4f82003be7798b767d5a33fcdbe819f /compiler/optimizing/optimizing_compiler.cc | |
| parent | 559b1cc279deb9299414ddd46595bb8bca7fa090 (diff) | |
Only do some checks when compiling against the core image.
This will avoid false negatives when running dex2oatd on apks.
bug:21865473
(cherry picked from commit 335005e2b3a179f26b7a8ae64ca60a1406b669bd)
Change-Id: Iac6dbe30c9d576077a0384b88696f79937d89471
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 895893298e..58647415d7 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -558,7 +558,8 @@ CompiledMethod* OptimizingCompiler::TryCompile(const DexFile::CodeItem* code_ite { PassInfo pass_info(HGraphBuilder::kBuilderPassName, &pass_info_printer); if (!builder.BuildGraph(*code_item)) { - CHECK(!shouldCompile) << "Could not build graph in optimizing compiler"; + DCHECK(!(IsCompilingWithCoreImage() && shouldCompile)) + << "Could not build graph in optimizing compiler"; return nullptr; } } @@ -646,4 +647,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 |