Skip to content

Commit

Permalink
Remove android_64bit_browser flag
Browse files Browse the repository at this point in the history
This flag was added as a means of swapping the ABIs of a 64-bit build,
to get a 64-bit browser instead of 32.  There are now build targets to
achieve the same thing, so the flag can be removed.

On a 64-bit configuration, you can now build:

- monochrome_public_bundle: 32-bit browser w/ 64-bit WebView
- monochrome_64_32_public_bundle: 64-bit browser w/ 32-bit WebView
- monochrome_64_public_bundle: 64-bit browser

BUG=907640

Change-Id: Id021645ac9b411510fdf23c09428d3d888a857f5
Reviewed-on: https://chromium-review.googlesource.com/c/1458360
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630000}
  • Loading branch information
Christopher Grant authored and Commit Bot committed Feb 7, 2019
1 parent 87c9a26 commit 9cd1720
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 54 deletions.
16 changes: 3 additions & 13 deletions android_webview/system_webview_apk_tmpl.gni
Expand Up @@ -7,7 +7,6 @@ import("//build/config/android/chrome_version.gni")
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
import("//build/config/locales.gni")
import("//chrome/android/chrome_public_apk_tmpl.gni")

template("system_webview_apk_tmpl") {
android_apk(target_name) {
Expand Down Expand Up @@ -42,18 +41,9 @@ template("system_webview_apk_tmpl") {
# Include placeholder libraries to ensure we are treated as the desired
# architecture.
if (android_64bit_target_cpu) {
if (android_64bit_browser) {
native_lib_placeholders = [ "libdummy.so" ]
if (build_apk_secondary_abi) {
secondary_abi_shared_libraries = [
"//android_webview:monochrome($android_secondary_abi_toolchain)",
]
}
} else {
shared_libraries = [ "//android_webview:monochrome" ]
if (build_apk_secondary_abi) {
secondary_native_lib_placeholders = [ "libdummy.so" ]
}
shared_libraries = [ "//android_webview:monochrome" ]
if (build_apk_secondary_abi) {
secondary_native_lib_placeholders = [ "libdummy.so" ]
}
} else {
native_lib_placeholders = [ "libdummy.so" ]
Expand Down
5 changes: 3 additions & 2 deletions chrome/android/BUILD.gn
Expand Up @@ -1085,7 +1085,7 @@ if (current_toolchain == default_toolchain) {
if (_is_monochrome) {
# Always use the 32-bit library's whitelist since the 64-bit one is
# webview-only.
if (!android_64bit_target_cpu || android_64bit_browser) {
if (!android_64bit_target_cpu) {
_fat_lib_toolchain = current_toolchain
} else {
_fat_lib_toolchain = android_secondary_abi_toolchain
Expand Down Expand Up @@ -1269,7 +1269,8 @@ template("libmonochrome_apk_or_bundle_tmpl") {
}
}

if (!android_64bit_target_cpu || !current_abi_is_webview_only) {
if (!android_64bit_target_cpu ||
current_toolchain == android_secondary_abi_toolchain) {
# Monochrome APK native library.
libmonochrome_apk_or_bundle_tmpl("monochrome") {
}
Expand Down
19 changes: 2 additions & 17 deletions chrome/android/chrome_public_apk_tmpl.gni
Expand Up @@ -24,9 +24,6 @@ declare_args() {

# Enable language splits in the Chrome bundles.
enable_chrome_language_splits = android_channel == "default"

# Build Monochrome/Trichrome as a 64-bit browser.
android_64bit_browser = false
}

default_chrome_public_jinja_variables = [
Expand All @@ -35,16 +32,6 @@ default_chrome_public_jinja_variables = [
"include_arcore_manifest_flag=$package_arcore",
]

if (android_64bit_browser) {
current_abi_is_webview_only =
defined(android_secondary_abi_toolchain) &&
current_toolchain == android_secondary_abi_toolchain
} else {
current_abi_is_webview_only =
defined(android_secondary_abi_toolchain) &&
current_toolchain != android_secondary_abi_toolchain
}

# A template used to declare any target that will implement a full Chromium
# or Chrome application, either as an APK, or an app bundle module.
#
Expand Down Expand Up @@ -284,11 +271,9 @@ template("monochrome_public_common_apk_or_module_tmpl") {
if (android_64bit_target_cpu) {
# Build //android_webview:monochrome with the opposite bitness that
# Chrome runs in.
if ((defined(invoker.is_64_bit_browser) && invoker.is_64_bit_browser) ||
android_64bit_browser) {
if (defined(invoker.is_64_bit_browser) && invoker.is_64_bit_browser) {
shared_libraries = [ "//chrome/android:monochrome_64${_suffix}" ]
if ((build_apk_secondary_abi && invoker.include_32_bit_webview) ||
android_64bit_browser) {
if (build_apk_secondary_abi && invoker.include_32_bit_webview) {
secondary_abi_shared_libraries = [ "//android_webview:monochrome_64${_suffix}($android_secondary_abi_toolchain)" ]
}
} else {
Expand Down
Expand Up @@ -2,16 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//chrome/android/chrome_public_apk_tmpl.gni")

use_32bit_abi_jinja_variable = "use32bitAbi=android:use32bitAbi=\"true\""

monochrome_android_manifest_jinja_variables = [
"min_sdk_version=24",
"sandboxed_service_exported=true",
use_32bit_abi_jinja_variable,
]

if (!android_64bit_browser) {
monochrome_android_manifest_jinja_variables +=
[ use_32bit_abi_jinja_variable ]
}
20 changes: 5 additions & 15 deletions chrome/android/trichrome.gni
Expand Up @@ -29,12 +29,9 @@ trichrome_jinja_variables = [
"trichrome_library=$trichrome_library_package",
"trichrome_version=$trichrome_version_code",
"trichrome_certdigest=$trichrome_certdigest",
"use32bitAbi=android:use32bitAbi=\"true\"",
]

if (!android_64bit_browser) {
trichrome_jinja_variables += [ "use32bitAbi=android:use32bitAbi=\"true\"" ]
}

template("trichrome_library_apk_tmpl") {
android_apk(target_name) {
forward_variables_from(invoker,
Expand Down Expand Up @@ -81,17 +78,10 @@ template("trichrome_library_apk_tmpl") {
# opposite-bitness placeholder library to ensure that the library is
# treated as multiarch and gets its Java code precompiled for both
# architectures.
if (android_64bit_browser) {
shared_libraries = [ "//chrome/android:monochrome" ]
if (build_apk_secondary_abi) {
secondary_native_lib_placeholders = [ "libdummy.so" ]
}
} else {
native_lib_placeholders = [ "libdummy.so" ]
if (build_apk_secondary_abi) {
secondary_abi_shared_libraries =
[ "//chrome/android:monochrome_secondary_abi_lib" ]
}
native_lib_placeholders = [ "libdummy.so" ]
if (build_apk_secondary_abi) {
secondary_abi_shared_libraries =
[ "//chrome/android:monochrome_secondary_abi_lib" ]
}
} else {
shared_libraries = [ "//chrome/android:monochrome" ]
Expand Down

0 comments on commit 9cd1720

Please sign in to comment.