| Index: build/config/android/rules.gni
|
| diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
|
| index e14fde0535fd68f69457b8837cf1934bb99138dc..816d0330062c4a3fa4bffa4269baa6670f137acc 100644
|
| --- a/build/config/android/rules.gni
|
| +++ b/build/config/android/rules.gni
|
| @@ -141,6 +141,7 @@
|
|
|
| if (enable_java_templates) {
|
| import("//build/config/sanitizers/sanitizers.gni")
|
| + import("//third_party/android_platform/config.gni")
|
| import("//tools/grit/grit_rule.gni")
|
|
|
| # Declare a jni target
|
| @@ -1423,9 +1424,6 @@
|
| # shared_libraries: List shared_library targets to bundle. If these
|
| # libraries depend on other shared_library targets, those dependencies will
|
| # also be included in the apk (e.g. for is_component_build).
|
| - # secondary_abi_shared_libraries: secondary abi shared_library targets to
|
| - # bundle. If these libraries depend on other shared_library targets, those
|
| - # dependencies will also be included in the apk (e.g. for is_component_build).
|
| # 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
|
| @@ -1440,8 +1438,7 @@
|
| # 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.
|
| - # secondary_native_libs (deprecated): The path of native libraries for secondary
|
| - # app abi.
|
| + # secondary_native_libs: The path of native libraries for secondary app abi.
|
| # run_findbugs_override: Forces run_findbugs on or off. If undefined, the
|
| # default will use the build arg run_findbugs.
|
| # proguard_jar_path: The path to proguard.jar you wish to use. If undefined,
|
| @@ -1557,25 +1554,13 @@
|
|
|
| # The dependency that makes the chromium linker, if any is needed.
|
| _native_libs_deps = []
|
| - _shared_libraries_is_valid =
|
| - defined(invoker.shared_libraries) && invoker.shared_libraries != []
|
| - _secondary_abi_native_libs_deps = []
|
| - assert(_secondary_abi_native_libs_deps == []) # mark as used.
|
| - _secondary_abi_shared_libraries_is_valid =
|
| - defined(invoker.secondary_abi_shared_libraries) &&
|
| - invoker.secondary_abi_shared_libraries != []
|
| -
|
| - if (is_component_build || is_asan) {
|
| - if (_shared_libraries_is_valid) {
|
| +
|
| + if (defined(invoker.shared_libraries) && invoker.shared_libraries != []) {
|
| + _native_libs_deps += invoker.shared_libraries
|
| +
|
| + if (is_component_build || is_asan) {
|
| _native_libs_deps += [ "//build/android:cpplib_stripped" ]
|
| }
|
| - if (_secondary_abi_shared_libraries_is_valid) {
|
| - _secondary_abi_native_libs_deps += [ "//build/android:cpplib_stripped($android_secondary_abi_toolchain)" ]
|
| - }
|
| - }
|
| -
|
| - if (_shared_libraries_is_valid) {
|
| - _native_libs_deps += invoker.shared_libraries
|
|
|
| # To determine the filenames of all dependent shared libraries, write the
|
| # runtime deps of |shared_libraries| to a file during "gn gen".
|
| @@ -1595,21 +1580,6 @@
|
| _native_lib_version_arg = "\"\""
|
| if (defined(invoker.native_lib_version_arg)) {
|
| _native_lib_version_arg = invoker.native_lib_version_arg
|
| - }
|
| - }
|
| -
|
| - if (_secondary_abi_shared_libraries_is_valid) {
|
| - _secondary_abi_native_libs_deps += invoker.secondary_abi_shared_libraries
|
| -
|
| - # To determine the filenames of all dependent shared libraries, write the
|
| - # runtime deps of |shared_libraries| to a file during "gn gen".
|
| - # write_build_config.py will then grep this file for *.so to obtain the
|
| - # complete list.
|
| - _secondary_abi_runtime_deps_file =
|
| - "$target_gen_dir/${_template_name}.secondary.abi.native.runtimedeps"
|
| - group("${_template_name}_secondary_abi__runtime_deps") {
|
| - deps = _secondary_abi_native_libs_deps
|
| - write_runtime_deps = _secondary_abi_runtime_deps_file
|
| }
|
| }
|
|
|
| @@ -1690,10 +1660,6 @@
|
| # and the runtime_deps file is added to write_build_config.py's depfile.
|
| if (_native_libs_deps != []) {
|
| shared_libraries_runtime_deps_file = _runtime_deps_file
|
| - }
|
| - if (_secondary_abi_native_libs_deps != []) {
|
| - secondary_abi_shared_libraries_runtime_deps_file =
|
| - _secondary_abi_runtime_deps_file
|
| }
|
| }
|
|
|
| @@ -1962,62 +1928,51 @@
|
|
|
| _native_libs_file_arg_dep = ":$build_config_target"
|
| _native_libs_file_arg = "@FileArg($_rebased_build_config:native:libraries)"
|
| - _secondary_abi_native_libs_file_arg_dep = ":$build_config_target"
|
| - _secondary_abi_native_libs_file_arg =
|
| - "@FileArg($_rebased_build_config:native:secondary_abi_libraries)"
|
| - assert(_secondary_abi_native_libs_file_arg != "" &&
|
| - _secondary_abi_native_libs_file_arg_dep != "") # Mark as used.
|
|
|
| if (_native_libs_deps != [] && _enable_relocation_packing) {
|
| _prepare_native_target_name = "${_template_name}__prepare_native"
|
| + _native_libs_dir = "$gen_dir/packed-libs"
|
| _native_libs_json = "$gen_dir/packed-libs/filelist.json"
|
| _rebased_native_libs_json = rebase_path(_native_libs_json, root_build_dir)
|
| +
|
| _native_libs_file_arg_dep = ":$_prepare_native_target_name"
|
| _native_libs_file_arg = "@FileArg($_rebased_native_libs_json:files)"
|
|
|
| - pack_relocation_section(_prepare_native_target_name) {
|
| + action(_prepare_native_target_name) {
|
| forward_variables_from(invoker,
|
| [
|
| "deps",
|
| "public_deps",
|
| ])
|
| - file_list_json = _native_libs_json
|
| - libraries_filearg =
|
| - "@FileArg(${_rebased_build_config}:native:libraries)"
|
| + script = "//build/android/gyp/pack_relocations.py"
|
| + depfile = "$target_gen_dir/$target_name.d"
|
| + outputs = [
|
| + _native_libs_json,
|
| + ]
|
| +
|
| inputs = [
|
| _build_config,
|
| ]
|
|
|
| deps += _native_libs_deps
|
| - deps += [ ":$build_config_target" ]
|
| - }
|
| - if (_secondary_abi_native_libs_deps != []) {
|
| - _prepare_native_target_name =
|
| - "${_template_name}_secondary_abi__prepare_native"
|
| - _native_libs_json =
|
| - "$gen_dir/packed-libs/$android_secondary_abi_cpu/filelist.json"
|
| - _rebased_native_libs_json =
|
| - rebase_path(_native_libs_json, root_build_dir)
|
| - _secondary_abi_native_libs_file_arg_dep =
|
| - ":$_prepare_native_target_name"
|
| - _secondary_abi_native_libs_file_arg =
|
| - "@FileArg($_rebased_native_libs_json:files)"
|
| -
|
| - pack_relocation_section(_prepare_native_target_name) {
|
| - forward_variables_from(invoker,
|
| - [
|
| - "deps",
|
| - "public_deps",
|
| - ])
|
| - file_list_json = _native_libs_json
|
| - libraries_filearg = "@FileArg(${_rebased_build_config}:native:secondary_abi_libraries)"
|
| - inputs = [
|
| - _build_config,
|
| - ]
|
| -
|
| - deps += _secondary_abi_native_libs_deps
|
| - deps += [ ":$build_config_target" ]
|
| - }
|
| + deps += [
|
| + ":$build_config_target",
|
| + relocation_packer_target,
|
| + ]
|
| +
|
| + args = [
|
| + "--depfile",
|
| + rebase_path(depfile, root_build_dir),
|
| + "--enable-packing=1",
|
| + "--android-pack-relocations",
|
| + rebase_path(relocation_packer_exe, root_build_dir),
|
| + "--stripped-libraries-dir",
|
| + rebase_path(root_build_dir, root_build_dir),
|
| + "--packed-libraries-dir",
|
| + rebase_path(_native_libs_dir, root_build_dir),
|
| + "--libraries=@FileArg(${_rebased_build_config}:native:libraries)",
|
| + "--filelistjson=$_rebased_native_libs_json",
|
| + ]
|
| }
|
| }
|
|
|
| @@ -2110,12 +2065,6 @@
|
| native_libs = _extra_native_libs
|
| native_libs_even_when_incremental =
|
| _extra_native_libs_even_when_incremental
|
| - }
|
| -
|
| - if (_secondary_abi_native_libs_deps != [] && !_create_abi_split) {
|
| - deps += _secondary_abi_native_libs_deps +
|
| - [ _secondary_abi_native_libs_file_arg_dep ]
|
| - secondary_abi_native_libs_filearg = _secondary_abi_native_libs_file_arg
|
| }
|
|
|
| # Placeholders necessary for some older devices.
|
|
|