Commit 7d1b8312 authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

trichrome: Fix unused gn variables

I am getting the following gn gen errors when I have the following gn
args in a clank repo. This CL fixes those unused gn variables to
suppress those errors.

Almost all of the changes are suggested by torne@chromium.org.

gn args:

target_os = "android"
target_cpu = "arm64"
dcheck_always_on = true
is_debug = true
is_java_debug = true
enable_proguard_obfuscation = false
is_component_build = false
symbol_level = 1
use_jumbo_build = false
build_apk_secondary_abi = false

gn error:

ERROR at //chrome/android/BUILD.gn:1553:29: Assignment had no effect.
  native_lib_version_rule = "//build/util:chrome_version_json"
                            ^---------------------------------
You set the variable "native_lib_version_rule" here and it was unused before it went
out of scope.
See //chrome/android/BUILD.gn:1530:1: whence it was called.
android_apk("trichrome_library_apk") {
^-------------------------------------
See //BUILD.gn:339:9: which caused the file to be included.
        "//chrome/android:chrome_junit_tests",
        ^------------------------------------

Bug: 887078
Change-Id: I6c2a7aaef437fde9e6c52311d086e11b1f86574c
Reviewed-on: https://chromium-review.googlesource.com/c/1284091Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600179}
parent a7f6d9d5
......@@ -1547,10 +1547,14 @@ android_apk("trichrome_library_apk") {
use_chromium_linker = false
uncompress_shared_libraries = true
_native_lib_file =
rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir)
native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)"
native_lib_version_rule = "//build/util:chrome_version_json"
# Only try to generate the native library version in configurations that
# include a native library.
if (!android_64bit_target_cpu || build_apk_secondary_abi) {
_native_lib_file =
rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir)
native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)"
native_lib_version_rule = "//build/util:chrome_version_json"
}
if (android_64bit_target_cpu) {
# Include a 64-bit placeholder library to ensure that the library is treated
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment