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

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

Issue 1473273002: GN(Android): Add libosmesa.so to ContentShell.apk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « build/config/android/internal_rules.gni ('k') | build/toolchain/android/BUILD.gn » ('j') | 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 e65607045caf93c1c238dda2cd3d80c8f40de0c6..9e7e604390ba19dc7c4a579c9226edb4d8f76b06 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -1191,9 +1191,16 @@ template("android_java_prebuilt") {
# apk_name: Name for final apk.
# final_apk_path: Path to final built apk. Default is
# $root_out_dir/apks/$apk_name.apk. Setting this will override apk_name.
+# loadable_modules: List of paths to native libraries to include. Different
+# from |native_libs| in that:
+# * dependencies of this .so are not automatically included,
+# * ".cr.so" is never added
+# * load_library_from_apk and enable_relocation_packing do not apply
+# * not side-loaded for _incremental targets.
pkotwicz 2015/11/25 01:18:34 Can you please: - Explain why someone would want t
agrieve 2015/11/25 21:26:57 Added to the end: # Use this instead of native
# native_libs: List paths of native libraries to include in this apk. If these
# libraries depend on other shared_library targets, those dependencies will
-# also be included in the apk.
+# also be included in the apk. When building with is_component_build,
+# The extension is automatically changed to ".cr.so".
# native_lib_placeholders: List of placeholder filenames to add to the apk
# (optional).
# apk_under_test: For an instrumentation test apk, this is the target of the
@@ -1266,6 +1273,10 @@ template("android_apk") {
assert(_final_apk_path_no_ext != "") # Mark as used.
_native_libs = []
+ _loadable_modules = []
+ if (defined(invoker.loadable_modules)) {
+ _loadable_modules = invoker.loadable_modules
+ }
_version_code = "1"
if (defined(invoker.version_code)) {
@@ -1692,8 +1703,9 @@ template("android_apk") {
":$final_dex_target_name",
]
- if (_native_libs != [] && !_create_abi_split) {
+ if ((_native_libs != [] || _loadable_modules != []) && !_create_abi_split) {
native_libs_dir = _native_libs_dir
+ native_libs = _loadable_modules
pkotwicz 2015/11/25 01:18:34 You are right. Having both |native_libs| and |nati
agrieve 2015/11/25 21:26:57 Acknowledged.
# Placeholders necessary for some older devices.
# http://crbug.com/395038
@@ -1703,7 +1715,7 @@ template("android_apk") {
}
}
- if (_native_libs != [] && _create_abi_split) {
+ if ((_native_libs != [] || _loadable_modules != []) && _create_abi_split) {
_manifest_rule = "${_template_name}__split_manifest_abi_${android_app_abi}"
generate_split_manifest(_manifest_rule) {
main_manifest = _android_manifest
@@ -1732,6 +1744,7 @@ template("android_apk") {
keystore_password = _keystore_password
native_libs_dir = _native_libs_dir
+ native_libs = _loadable_modules
# Placeholders necessary for some older devices.
# http://crbug.com/395038
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | build/toolchain/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698