Commit 2d6f6db0 authored by Henry Jian's avatar Henry Jian Committed by Commit Bot

Revert "[Android] Move linker from Trichrome library to chrome"

This reverts commit 3c12c3b0.

Reason for revert: it breaks chrome AR, see https://crbug.com/1062910

Original change's description:
> [Android] Move linker from Trichrome library to chrome
>
> Also, move linker loadable module inclusion from rules.gni to
> chrome_public_apk_tmpl.gni
>
> Bug:1032062
>
> Change-Id: Idfd0116321ee23b6cf8e6628553f10c569bb6b58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2091645
> Commit-Queue: Henry Jian <hzjian@google.com>
> Reviewed-by: Peter Wen <wnwen@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#749845}

TBR=wnwen@chromium.org,agrieve@chromium.org,hzjian@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1032062,1062910
Change-Id: I26aa95ed864410b9a721ecdc6243441fc5721e33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2109252Reviewed-by: default avatarKlaus Weidner <klausw@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751596}
parent 988b1dad
......@@ -2662,8 +2662,15 @@ if (enable_java_templates) {
_loadable_modules = invoker.loadable_modules
}
_loadable_modules_deps = []
if (_native_libs_deps != []) {
_loadable_modules += _sanitizer_runtimes
if (_use_chromium_linker) {
_loadable_modules +=
[ "$root_out_dir/libchromium_android_linker$shlib_extension" ]
_loadable_modules_deps +=
[ "//base/android/linker:chromium_android_linker" ]
}
}
if (_generate_buildconfig_java) {
......@@ -3049,7 +3056,8 @@ if (enable_java_templates) {
}
}
_all_native_libs_deps = _native_libs_deps + _secondary_abi_native_libs_deps
_all_native_libs_deps = _native_libs_deps + _loadable_modules_deps +
_secondary_abi_native_libs_deps
if (_all_native_libs_deps != []) {
_native_libs_file_arg_dep = ":$_build_config_target"
_all_native_libs_deps += [ _native_libs_file_arg_dep ]
......@@ -3333,8 +3341,8 @@ if (enable_java_templates) {
if (_incremental_apk) {
# device/commands is used by the installer script to push files via .zip.
data_deps +=
[ "//build/android/pylib/device/commands" ] + _native_libs_deps
data_deps += [ "//build/android/pylib/device/commands" ] +
_native_libs_deps + _loadable_modules_deps
}
if (_uses_static_library) {
data_deps += [ invoker.static_library_provider ]
......
......@@ -277,21 +277,6 @@ template("chrome_public_common_apk_or_module_tmpl") {
}
if (use_chromium_linker) {
_is_non_trichrome_3264 =
_is_trichrome && android_64bit_target_cpu && !_is_64_bit_browser
if (_is_non_trichrome_3264) {
_seconday_linker = "//base/android/linker:chromium_android_linker($android_secondary_abi_toolchain)"
deps += [ _seconday_linker ]
_secondary_out_dir = get_label_info(_seconday_linker, "root_out_dir")
secondary_abi_loadable_modules +=
[ "$_secondary_out_dir/libchromium_android_linker$shlib_extension" ]
} else {
deps += [ "//base/android/linker:chromium_android_linker" ]
loadable_modules +=
[ "$root_out_dir/libchromium_android_linker$shlib_extension" ]
}
if (!defined(load_library_from_apk)) {
# Whether native libraries should be loaded from within the apk.
# Only attempt loading the library from the APK for 64 bit devices
......
......@@ -161,6 +161,11 @@ template("trichrome_library_apk_tmpl") {
"//third_party/crashpad/crashpad/handler:crashpad_handler_trampoline",
]
loadable_modules = [ "$root_out_dir/libcrashpad_handler_trampoline.so" ]
if (chromium_linker_supported) {
deps += [ "//base/android/linker:chromium_android_linker" ]
loadable_modules += [ "$root_out_dir/libchromium_android_linker.so" ]
}
}
if (_include_secondary_support) {
_trampoline =
......@@ -173,6 +178,13 @@ template("trichrome_library_apk_tmpl") {
_secondary_out_dir = get_label_info(_trampoline, "root_out_dir")
secondary_abi_loadable_modules =
[ "$_secondary_out_dir/libcrashpad_handler_trampoline.so" ]
if (chromium_linker_supported) {
deps += [ "//base/android/linker:chromium_android_linker" +
"($android_secondary_abi_toolchain)" ]
secondary_abi_loadable_modules +=
[ "$_secondary_out_dir/libchromium_android_linker.so" ]
}
}
# http://crbug.com/1042107.
......
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