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

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

Issue 721123002: GN: Have android_apk always look for stripped libraries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Follow review Created 6 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 | « no previous file | chrome/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 d28c4814531ffe2e742a605a10de70fbddd468fc..c130dd41692227fe41d2852d1e37a63b3fc46ec4 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -993,7 +993,10 @@ template("android_apk") {
" Chromium linker.")
}
- _native_libs = invoker.native_libs
+ _native_libs = process_file_template(
+ invoker.native_libs,
+ "$root_build_dir/lib.stripped/{{source_file_part}}")
+
_native_libs_dir = base_path + "/libs"
if (_use_chromium_linker) {
@@ -1220,10 +1223,9 @@ template("android_apk") {
# resource dependencies of the apk.
# unittests_dep: This should be the label of the gtest native target. This
# target must be defined previously in the same file.
-# unittests_binary: The name of the binary produced by the unittests_dep
-# target, relative to the root build directory. If unspecified, it assumes
-# the name of the unittests_dep target (which will be correct unless that
-# target specifies an "output_name".
+# unittests_binary: The basename of the library produced by the unittests_dep
+# target. If unspecified, it assumes the name of the unittests_dep target
+# (which will be correct unless that target specifies an "output_name".
# TODO(brettw) make this automatic by allowing get_target_outputs to
# support executables.
#
@@ -1240,9 +1242,9 @@ template("unittest_apk") {
test_suite_name = get_label_info(invoker.unittests_dep, "name")
if (defined(invoker.unittests_binary)) {
- unittests_binary = root_out_dir + "/" + invoker.unittests_binary
+ unittests_binary = invoker.unittests_binary
} else {
- unittests_binary = root_out_dir + "/lib.stripped/lib" + test_suite_name + ".so"
+ unittests_binary = "lib" + test_suite_name + ".so"
}
android_apk(target_name) {
@@ -1252,8 +1254,7 @@ template("unittest_apk") {
"//testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java"
]
android_manifest = "//testing/android/java/AndroidManifest.xml"
- unittests_outputs = [ unittests_binary ]
- native_libs = [unittests_outputs[0]]
+ native_libs = [ unittests_binary ]
deps = [ "//base:base_java" ]
if (defined(invoker.deps)) {
deps += invoker.deps
« no previous file with comments | « no previous file | chrome/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698