Commit ae5bd514 authored by Tibor Goldschwendt's avatar Tibor Goldschwendt Committed by Commit Bot

[android] Forward uncompress_shared_libraries flag to bundle modules

This fixes a startup crash of the Chrome modern bundle where
uncompress_shared_libraries was erroneously set to false for the Chrome
modern base module.

Bug: 875872
Change-Id: Ie9817ea350f4703950608eff35e5b6129cb9e508
Reviewed-on: https://chromium-review.googlesource.com/1181936
Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: default avataragrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584579}
parent 37874bdb
...@@ -2332,9 +2332,6 @@ if (enable_java_templates) { ...@@ -2332,9 +2332,6 @@ if (enable_java_templates) {
"secondary_abi_loadable_modules", "secondary_abi_loadable_modules",
"uncompress_shared_libraries", "uncompress_shared_libraries",
]) ])
if (!defined(uncompress_shared_libraries)) {
uncompress_shared_libraries = _load_library_from_apk
}
_dex_target = "//build/android/incremental_install:bootstrap_java__dex" _dex_target = "//build/android/incremental_install:bootstrap_java__dex"
deps = _incremental_deps + [ deps = _incremental_deps + [
":${_incremental_compile_resources_target_name}", ":${_incremental_compile_resources_target_name}",
......
...@@ -1897,6 +1897,9 @@ if (enable_java_templates) { ...@@ -1897,6 +1897,9 @@ if (enable_java_templates) {
# shared_resources_whitelist_target: Optional name of a target specifying # shared_resources_whitelist_target: Optional name of a target specifying
# an input R.txt file that lists the resources that can be exported # an input R.txt file that lists the resources that can be exported
# by the APK when shared_resources or app_as_shared_lib is defined. # by the APK when shared_resources or app_as_shared_lib is defined.
# uncompress_shared_libraries: True if shared libraries should be stored
# uncompressed in the APK. Must be unset or true if load_library_from_apk
# is set to true.
template("android_apk_or_module") { template("android_apk_or_module") {
forward_variables_from(invoker, [ "testonly" ]) forward_variables_from(invoker, [ "testonly" ])
...@@ -2014,6 +2017,15 @@ if (enable_java_templates) { ...@@ -2014,6 +2017,15 @@ if (enable_java_templates) {
"load_library_from_apk requires use_chromium_linker " + "load_library_from_apk requires use_chromium_linker " +
"or requires_sdk_api_level_23") "or requires_sdk_api_level_23")
# Make sure that uncompress_shared_libraries is set to true if
# load_library_from_apk is true.
if (defined(invoker.uncompress_shared_libraries)) {
_uncompress_shared_libraries = invoker.uncompress_shared_libraries
assert(!_load_library_from_apk || _uncompress_shared_libraries)
} else {
_uncompress_shared_libraries = _load_library_from_apk
}
# The dependency that makes the chromium linker, if any is needed. # The dependency that makes the chromium linker, if any is needed.
_native_libs_deps = [] _native_libs_deps = []
_shared_libraries_is_valid = _shared_libraries_is_valid =
...@@ -2299,7 +2311,6 @@ if (enable_java_templates) { ...@@ -2299,7 +2311,6 @@ if (enable_java_templates) {
"loadable_modules", "loadable_modules",
"no_build_hooks", "no_build_hooks",
"secondary_abi_loadable_modules", "secondary_abi_loadable_modules",
"uncompress_shared_libraries",
]) ])
if (_is_bundle_module) { if (_is_bundle_module) {
type = "android_app_bundle_module" type = "android_app_bundle_module"
...@@ -2352,6 +2363,8 @@ if (enable_java_templates) { ...@@ -2352,6 +2363,8 @@ if (enable_java_templates) {
} }
extra_shared_libraries = _extra_native_libs extra_shared_libraries = _extra_native_libs
uncompress_shared_libraries = _uncompress_shared_libraries
} }
# TODO(cjhopman): This is only ever needed to calculate the list of tests to # TODO(cjhopman): This is only ever needed to calculate the list of tests to
...@@ -2530,7 +2543,6 @@ if (enable_java_templates) { ...@@ -2530,7 +2543,6 @@ if (enable_java_templates) {
[ [
"public_deps", "public_deps",
"shared_resources", "shared_resources",
"uncompress_shared_libraries",
"write_asset_list", "write_asset_list",
]) ])
packaged_resources_path = _packaged_resources_path packaged_resources_path = _packaged_resources_path
...@@ -2590,6 +2602,8 @@ if (enable_java_templates) { ...@@ -2590,6 +2602,8 @@ if (enable_java_templates) {
"native_lib_placeholders", "native_lib_placeholders",
"secondary_native_lib_placeholders", "secondary_native_lib_placeholders",
]) ])
uncompress_shared_libraries = _uncompress_shared_libraries
} }
} else { } else {
# placeholder native libraries never go into bundles, since they are # placeholder native libraries never go into bundles, since they are
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//base/android/linker/config.gni")
import("//build/config/android/rules.gni") import("//build/config/android/rules.gni")
import("//device/vr/buildflags/buildflags.gni") import("//device/vr/buildflags/buildflags.gni")
...@@ -30,5 +31,6 @@ template("vr_module_tmpl") { ...@@ -30,5 +31,6 @@ template("vr_module_tmpl") {
"//chrome/browser/android/vr:java", "//chrome/browser/android/vr:java",
] ]
proguard_enabled = !is_java_debug proguard_enabled = !is_java_debug
uncompress_shared_libraries = chromium_linker_supported
} }
} }
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