Commit 133ae77d authored by Christopher Grant's avatar Christopher Grant Committed by Commit Bot

Reland "Android: Align libchrome and libmonochrome GN target names"

This is a reland of 2f208730

Original change's description:
> Android: Align libchrome and libmonochrome GN target names
> 
> The GN target to build libchrome.so is historically called "libchrome",
> whereas libmonochrome.so's target is "monochrome".  The missing lib
> prefix on Monochrome necessitated special cases when referring to the
> library.
> 
> Further, when we start generating partitioned libraries, the
> subdirectory they get dumped into is based on the target name, and it'd
> be nice not to have to special-case that too, for the sake of release
> scripts.
> 
> Change-Id: I3d743ffdcab1fad47b7e9b4d15cfd31591428980
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1646414
> Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
> Reviewed-by: Richard Coles <torne@chromium.org>
> Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
> Commit-Queue: Christopher Grant <cjgrant@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#666762}

Change-Id: Ieb1e82cc9f044b5c31c26cc5a40784cc0190c041
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647965Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667129}
parent e581f6d1
......@@ -449,22 +449,17 @@ if (defined(android_secondary_abi_toolchain)) {
# Note here that on a given system, the webview-only library needs the same
# library name as the browser library, since the system webview factory will
# differentiate only by ABI. Each library has an app-bundle ("_base")
# variant.
# differentiate only by ABI.
if (current_toolchain == android_secondary_abi_toolchain) {
# These targets are the 32-bit WebView libraries that pair with a 64-bit
# browser. They are suffixed with _64 because their names must mach the
# 64-bit browser library.
# This target is the 32-bit WebView library that pairs with a 64-bit
# browser. It is suffixed with _64 because its name must match the 64-bit
# browser library.
webview_library("monochrome_64") {
}
webview_library("monochrome_64_base") {
}
} else {
# Inverse of the others above, for the original 32-bit case.
# Inverse of above, for the original 32-bit case.
webview_library("monochrome") {
}
webview_library("monochrome_base") {
}
}
}
......
......@@ -1234,21 +1234,14 @@ if (current_toolchain == default_toolchain) {
if (enable_resource_whitelist_generation) {
if (_is_trichrome || _is_monochrome) {
_lib = "monochrome"
_lib = "libmonochrome"
} else {
_lib = "chrome"
_lib = "libchrome"
}
_resource_whitelist_target = "${_variant}_resource_whitelist"
_resource_whitelist_file =
"$target_gen_dir/${_variant}_resource_whitelist.txt"
if (_is_trichrome || _is_monochrome) {
_target_prefix = ""
} else {
_target_prefix = "lib"
}
_lib_path = "/lib.unstripped/lib" + _lib + shlib_extension
_lib_target = _target_prefix + _lib
_lib_path = "/lib.unstripped/" + _lib + shlib_extension
generate_resource_whitelist(_resource_whitelist_target) {
_fat_lib_toolchain = ""
......@@ -1262,7 +1255,7 @@ if (current_toolchain == default_toolchain) {
}
}
deps = [
":${_lib_target}($_fat_lib_toolchain)",
":${_lib}($_fat_lib_toolchain)",
]
inputs = [
......@@ -1439,25 +1432,25 @@ template("libmonochrome_apk_or_bundle_tmpl") {
if (!android_64bit_target_cpu ||
current_toolchain == android_secondary_abi_toolchain) {
# Monochrome APK native library.
libmonochrome_apk_or_bundle_tmpl("monochrome") {
libmonochrome_apk_or_bundle_tmpl("libmonochrome") {
}
if (android_64bit_target_cpu) {
group("monochrome_64_secondary_abi_lib") {
public_deps = [
":monochrome_64($android_secondary_abi_toolchain)",
":libmonochrome_64($android_secondary_abi_toolchain)",
]
}
}
} else {
# 64-bit browser library targets (APK and bundle).
libmonochrome_apk_or_bundle_tmpl("monochrome_64") {
libmonochrome_apk_or_bundle_tmpl("libmonochrome_64") {
}
# 32-bit browser library alias targets, pulled in by 64-bit WebView builds.
group("monochrome_secondary_abi_lib") {
public_deps = [
":monochrome($android_secondary_abi_toolchain)",
":libmonochrome($android_secondary_abi_toolchain)",
]
}
}
......
......@@ -12,7 +12,7 @@ import("//device/vr/buildflags/buildflags.gni")
# TODO(cjgrant): Remove these variables once downstream stops using them.
bundle_library_suffix = ""
apk_pak_asset_type = "apk"
apk_pak_asset_type = "_apk"
# This value is set downstream for internal builds.
if (!defined(default_chrome_orderfile)) {
......
......@@ -88,7 +88,7 @@ template("chrome_public_common_apk_or_module_tmpl") {
library_target = invoker.shared_library_for_unwind_asset
deps = invoker.shared_libraries
if (build_apk_secondary_abi && defined(android_secondary_abi_cpu)) {
deps += [ "//chrome/android:${library_target}($android_secondary_abi_toolchain)" ]
deps += [ "//chrome/android:lib${library_target}($android_secondary_abi_toolchain)" ]
}
}
}
......@@ -308,7 +308,7 @@ template("monochrome_public_common_apk_or_module_tmpl") {
# Build //android_webview:monochrome with the opposite bitness that
# Chrome runs in.
if (defined(invoker.is_64_bit_browser) && invoker.is_64_bit_browser) {
shared_libraries = [ "//chrome/android:monochrome_64" ]
shared_libraries = [ "//chrome/android:libmonochrome_64" ]
if (build_apk_secondary_abi && invoker.include_32_bit_webview) {
secondary_abi_shared_libraries = [ "//android_webview:monochrome_64($android_secondary_abi_toolchain)" ]
}
......@@ -320,7 +320,7 @@ template("monochrome_public_common_apk_or_module_tmpl") {
}
}
} else {
shared_libraries = [ "//chrome/android:monochrome" ]
shared_libraries = [ "//chrome/android:libmonochrome" ]
}
if (invoker.add_unwind_tables_in_apk) {
shared_library_for_unwind_asset = "monochrome"
......
......@@ -72,9 +72,9 @@ template("vr_module_tmpl") {
}
}
if (_is_monochrome_or_trichrome) {
_base_target_name = "monochrome${_arch}_base"
_base_target_name = "libmonochrome${_arch}"
} else {
_base_target_name = "libchrome${_arch}_base"
_base_target_name = "libchrome${_arch}"
}
_module = "vr"
deps +=
......
......@@ -109,7 +109,7 @@ template("trichrome_library_apk_tmpl") {
deps += [ "//android_webview:v8_snapshot_secondary_abi_assets" ]
}
} else {
shared_libraries = [ "//chrome/android:monochrome" ]
shared_libraries = [ "//chrome/android:libmonochrome" ]
deps += [
"//third_party/crashpad/crashpad/handler:crashpad_handler_trampoline",
]
......
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