Revert "Revert "Allow preopted apps to have sharpened calls for non-x86 architectures.""
Should really say it allows pre-linked calls instead of sharpened calls.
Bug: 19100762
Change-Id: Ia2045a9eda92255e87a7f6187de18d6370b8f060
diff --git a/compiler/dex/quick/arm64/call_arm64.cc b/compiler/dex/quick/arm64/call_arm64.cc
index 6492442..d2204f5 100644
--- a/compiler/dex/quick/arm64/call_arm64.cc
+++ b/compiler/dex/quick/arm64/call_arm64.cc
@@ -400,9 +400,8 @@
}
static bool Arm64UseRelativeCall(CompilationUnit* cu, const MethodReference& target_method) {
- UNUSED(cu, target_method);
- // Always emit relative calls.
- return true;
+ // Emit relative calls anywhere in the image or within a dex file otherwise.
+ return cu->compiler_driver->IsImage() || cu->dex_file == target_method.dex_file;
}
/*