Index: build/config/android/rules.gni |
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni |
index d72242c1225605a2b64775a2f8ccdd7e22281348..4a4471d55d194d5bf107e4dfa21bb9895edb600d 100644 |
--- a/build/config/android/rules.gni |
+++ b/build/config/android/rules.gni |
@@ -1232,6 +1232,9 @@ template("android_java_prebuilt") { |
# all other asset files. |
# alternative_locale_resource_dep: The locale resource target which overrides |
# any exsting locale resources in dep graph. |
+# requires_sdk_api_level_23: If defined and true, the apk is intended for |
+# installation only on Android M or later. In these releases the system |
+# linker does relocation unpacking, so we can enable it unconditionally. |
# |
# DEPRECATED_java_in_dir: Directory containing java files. All .java files in |
# this directory will be included in the library. This is only supported to |
@@ -1336,9 +1339,14 @@ template("android_apk") { |
assert(_use_chromium_linker || true) # Mark as used. |
assert(_enable_relocation_packing || true) # Mark as used. |
- assert( |
- !_load_library_from_apk || _use_chromium_linker, |
- "Loading library from the apk requires use" + " of the Chromium linker.") |
+ assert(!_load_library_from_apk || _use_chromium_linker, |
+ "Loading library from the apk requires use of the Chromium linker.") |
Torne
2016/02/16 15:46:56
It's okay to load library from APK if it's sdk 23+
simonb (inactive)
2016/02/16 16:54:08
Yes, but at present only if the chromium linker is
Torne
2016/02/16 17:58:49
OK.
|
+ |
+ # If the apk is for Android M or later, always enable relocation packing. |
+ if (defined(invoker.requires_sdk_api_level_23) && |
Torne
2016/02/16 15:46:56
Can we just make this setting work like the other
simonb (inactive)
2016/02/16 16:54:08
The assert condition that the linker supports unpa
Torne
2016/02/16 17:58:49
No, I mean, can we just make the *logic* work the
|
+ invoker.requires_sdk_api_level_23) { |
+ _enable_relocation_packing = true |
+ } |
# The dependency that makes the chromium linker, if any is needed. |
_native_libs_deps = [] |