Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2971)

Unified Diff: build/config/android/rules.gni

Issue 1801893003: Add a variable indicating the target as Android M or later. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/android/rules.gni
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index 7f57b03e10e5cf225461ef1c495e229488fe5013..f0246756178b98dca7112e64029ef93fd57fedf7 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -1267,6 +1267,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
@@ -1365,15 +1368,20 @@ template("android_apk") {
invoker.enable_relocation_packing
_load_library_from_apk =
defined(invoker.load_library_from_apk) && invoker.load_library_from_apk
+ _requires_sdk_api_level_23 = defined(invoker.requires_sdk_api_level_23) &&
+ invoker.requires_sdk_api_level_23
assert(_use_chromium_linker || true) # Mark as used.
+ assert(_requires_sdk_api_level_23 || true)
if (_enable_relocation_packing) {
- assert(_use_chromium_linker,
- "enable_relocation_packing requires use_chromium_linker")
+ assert(_use_chromium_linker || _requires_sdk_api_level_23,
+ "enable_relocation_packing requires either use_chromium_linker " +
+ "or requires_sdk_api_level_23")
}
if (_load_library_from_apk) {
- assert(_use_chromium_linker,
- "load_library_from_apk requires use_chromium_linker")
+ assert(_use_chromium_linker || _requires_sdk_api_level_23,
+ "load_library_from_apk requires use_chromium_linker " +
+ "or requires_sdk_api_level_23")
}
# The dependency that makes the chromium linker, if any is needed.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698