Commit 3c12c3b0 authored by Henry Jian's avatar Henry Jian Committed by Commit Bot

[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: default avatarPeter Wen <wnwen@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749845}
parent bfed33e6
......@@ -2672,15 +2672,8 @@ 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) {
......@@ -3066,8 +3059,7 @@ if (enable_java_templates) {
}
}
_all_native_libs_deps = _native_libs_deps + _loadable_modules_deps +
_secondary_abi_native_libs_deps
_all_native_libs_deps = _native_libs_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 ]
......@@ -3351,8 +3343,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 + _loadable_modules_deps
data_deps +=
[ "//build/android/pylib/device/commands" ] + _native_libs_deps
}
if (_uses_static_library) {
data_deps += [ invoker.static_library_provider ]
......
......@@ -273,6 +273,21 @@ 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,11 +161,6 @@ 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 =
......@@ -178,13 +173,6 @@ 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