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

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

Issue 1438413004: Port placeholders logic GYP->GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix assert 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/android/gyp/apkbuilder.py ('k') | build/config/android/rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/android/internal_rules.gni
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
index 9895c460102fa50a4095bd405efe364986a8d9e1..29b20889c27d4c772c97da774a1c0bd3c847827f 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -545,8 +545,9 @@ template("process_java_prebuilt") {
# dex_path: Path to classes.dex file to include (optional).
# resource_packaged_apk_path: Path to .ap_ to use.
# output_apk_path: Output path for the generated .apk.
+# native_lib_placeholders: List of placeholder filenames to add to the apk
+# (optional).
# native_libs_dir: Directory containing native libraries.
-# create_placeholder_lib: Whether to add a dummy lib to the apk.
template("package_apk") {
action(target_name) {
forward_variables_from(invoker,
@@ -555,8 +556,10 @@ template("package_apk") {
"public_deps",
"testonly",
])
- _create_placeholder_lib = defined(invoker.create_placeholder_lib) &&
- invoker.create_placeholder_lib
+ _native_lib_placeholders = []
+ if (defined(invoker.native_lib_placeholders)) {
+ _native_lib_placeholders = invoker.native_lib_placeholders
+ }
script = "//build/android/gyp/apkbuilder.py"
depfile = "$target_gen_dir/$target_name.d"
@@ -599,7 +602,7 @@ template("package_apk") {
_rebased_dex_path = rebase_path(invoker.dex_path, root_build_dir)
args += [ "--dex-file=$_rebased_dex_path" ]
}
- if (defined(invoker.native_libs_dir) || _create_placeholder_lib) {
+ if (defined(invoker.native_libs_dir) || _native_lib_placeholders != []) {
args += [ "--android-abi=$android_app_abi" ]
}
if (defined(invoker.native_libs_dir)) {
@@ -607,8 +610,8 @@ template("package_apk") {
rebase_path(invoker.native_libs_dir, root_build_dir)
args += [ "--native-libs-dir=$_rebased_native_libs_dir/$android_app_abi" ]
}
- if (_create_placeholder_lib) {
- args += [ "--create-placeholder-lib" ]
+ if (_native_lib_placeholders != []) {
+ args += [ "--native-lib-placeholders=$_native_lib_placeholders" ]
}
}
}
@@ -878,6 +881,7 @@ template("create_apk") {
forward_variables_from(invoker,
[
"assets_build_config",
+ "native_lib_placeholders",
"native_libs_dir",
])
deps = _deps + [ ":${_package_resources_target_name}" ]
@@ -906,7 +910,7 @@ template("create_apk") {
# http://crbug.com/384638
if (defined(invoker.native_libs_dir)) {
- create_placeholder_lib = true
+ native_lib_placeholders = [ "libfix.crbug.384638.so" ]
}
output_apk_path = _incremental_packaged_apk_path
« no previous file with comments | « build/android/gyp/apkbuilder.py ('k') | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698