forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Android Unwinder] Add new unwind info generation to build script
This CL adds the generation of the new unwind info to build script behind a build flag "use_android_unwinder_v2". Bug: 1240698 Change-Id: Ie63879b5396f03f2253ff1f79f2c4d00c69ef108 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3259978 Reviewed-by: Mike Wittman <wittman@chromium.org> Reviewed-by: Andrew Grieve <agrieve@chromium.org> Reviewed-by: Dirk Pranke <dpranke@google.com> Commit-Queue: Charlie Hu <chenleihu@google.com> Cr-Commit-Position: refs/heads/main@{#949287}
- Loading branch information
Charlie Hu
authored and
Chromium LUCI CQ
committed
Dec 8, 2021
1 parent
ba8e41e
commit d98dc69
Showing
5 changed files
with
150 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright 2021 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//build/config/android/rules.gni") | ||
|
||
template("unwind_table_asset_v2") { | ||
_asset_path = "${target_out_dir}/${target_name}/unwind_cfi_32_v2" | ||
_unwind_action = "${target_name}__create_unwind_table" | ||
|
||
action(_unwind_action) { | ||
forward_variables_from(invoker, TESTONLY_AND_VISIBILITY) | ||
|
||
_root_dir = "$root_out_dir" | ||
if (defined(android_secondary_abi_cpu)) { | ||
_root_dir = get_label_info(":foo($android_secondary_abi_toolchain)", | ||
"root_out_dir") | ||
} | ||
|
||
script = "//build/android/gyp/create_unwind_table.py" | ||
outputs = [ _asset_path ] | ||
inputs = [ "${_root_dir}/lib.unstripped/$shlib_prefix${invoker.library_target}$shlib_extension" ] | ||
|
||
args = [ | ||
"--input_path", | ||
rebase_path( | ||
"${_root_dir}/lib.unstripped/$shlib_prefix${invoker.library_target}$shlib_extension", | ||
root_build_dir), | ||
"--output_path", | ||
rebase_path(_asset_path, root_build_dir), | ||
"--dump_syms_path", | ||
rebase_path("$root_out_dir/dump_syms", root_build_dir), | ||
] | ||
deps = invoker.deps | ||
deps += [ "//third_party/breakpad:dump_syms" ] | ||
} | ||
|
||
android_assets(target_name) { | ||
forward_variables_from(invoker, TESTONLY_AND_VISIBILITY) | ||
sources = [ _asset_path ] | ||
disable_compression = true | ||
deps = [ ":$_unwind_action" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters