summaryrefslogtreecommitdiff
path: root/compiler/optimizing/inliner.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r--compiler/optimizing/inliner.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 39f684b895..741e6dffc1 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -1745,11 +1745,12 @@ static bool CanEncodeInlinedMethodInStackMap(const DexFile& outer_dex_file,
// Inline across dexfiles if the callee's DexFile is:
// 1) in the bootclasspath, or
if (callee->GetDeclaringClass()->GetClassLoader() == nullptr) {
- // There are cases in which the BCP DexFiles are within the OatFile as far as the compiler
- // options are concerned, but they have their own OatWriter (and therefore not in the same
- // OatFile). Then, we request the BSS check for all BCP DexFiles.
- // TODO(solanes): Add .bss support for BCP.
- *out_needs_bss_check = true;
+ // In multi-image, each BCP DexFile has their own OatWriter. Since they don't cooperate with
+ // each other, we request the BSS check for them.
+ // TODO(solanes): Add .bss support for BCP multi-image.
+ const bool is_multi_image = codegen->GetCompilerOptions().IsBootImage() ||
+ codegen->GetCompilerOptions().IsBootImageExtension();
+ *out_needs_bss_check = is_multi_image;
return true;
}