Commit 93d12f49 authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

Merge DFM resources to base module when enable_isolated_splits is true

This makes sure DFM resources are merged even when the chrome module is
disabled.

Bug: 1151538
Change-Id: I5f73ee21fbfbec401c8f5a9c0255c5fb85ebf994
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2561759Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831249}
parent 1a4b5bd7
......@@ -526,9 +526,10 @@ template("monochrome_public_common_apk_or_module_tmpl") {
}
}
# Sets ISOLATED_SPLITS_ENABLED in BuildConfig.java.
if (_is_bundle_module) {
isolated_splits_enabled = enable_isolated_splits
if (_is_bundle_module && enable_isolated_splits) {
# Sets ISOLATED_SPLITS_ENABLED in BuildConfig.java.
isolated_splits_enabled = true
deps += [ ":${target_name}__all_dfm_resources" ]
}
# Add all loadable modules and shared libraries from DFMs.
......@@ -547,7 +548,6 @@ template("monochrome_public_common_apk_or_module_tmpl") {
} else {
deps += [ "//chrome/android:base_module_java" ]
}
deps += [ ":${target_name}__all_chrome_resources" ]
if (is_component_build) {
if (android_64bit_target_cpu && !invoker.is_64_bit_browser) {
secondary_abi_shared_libraries += _chrome_module_shared_lib_deps
......
......@@ -34,7 +34,6 @@ template("chrome_bundle") {
# - All //chrome-specific manifest definitions (e.g. activities, services)
# will be moved to the chrome DFM AndroidManifest.xml.
if (_enable_chrome_module) {
_base_target_name = get_label_info(invoker.base_module_target, "name")
_base_target_gen_dir =
get_label_info(invoker.base_module_target, "target_gen_dir")
_base_name = get_label_info(invoker.base_module_target, "name")
......@@ -111,10 +110,17 @@ template("chrome_bundle") {
load_native_on_get_impl = false
}
_module_descs += [ chrome_module_desc ]
} else {
_module_descs = invoker.module_descs
}
_enable_isolated_splits =
enable_isolated_splits && invoker.is_monochrome_or_trichrome
if (_enable_isolated_splits) {
# TODO(crbug.com/1126301): Isolated splits cause various bugs with resource
# access. For now, move all resources to the base module.
android_resources("${_base_target_name}__all_chrome_resources") {
_base_target_name = get_label_info(invoker.base_module_target, "name")
android_resources("${_base_target_name}__all_dfm_resources") {
recursive_resource_deps = true
deps = []
......@@ -127,8 +133,6 @@ template("chrome_bundle") {
}
}
}
} else {
_module_descs = invoker.module_descs
}
foreach(_tmp_module_desc, _module_descs) {
assert(_package_id > 2, "Too many modules, ran out of package IDs!")
......
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