Commit 9d635581 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Update some documentation for the binary_size tool

The documentation didn't include the crucial information
that generate_linker_map has to be set to true in gn for the tool
to work in Linux.

Bug: 716209
Change-Id: I62919e26a80a0b5d592f6b8953762e35575142d2
Reviewed-on: https://chromium-review.googlesource.com/c/1338085Reviewed-by: default avataragrieve <agrieve@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#609686}
parent 87866bee
......@@ -23,8 +23,6 @@ declare_args() {
use_xcode_clang = is_ios && is_official_build
# Used for binary size analysis.
# Currently disabled on LLD because of a bug (fixed upstream).
# See https://crbug.com/716209.
generate_linker_map = is_android && is_official_build
# Use absolute file paths in the compiler diagnostics and __FILE__ macro
......
......@@ -65,6 +65,8 @@ Supports Android and Linux (although Linux
* Map files contain some unique pieces of information compared to `nm`
output, such as `** merge strings` entries, and some unnamed symbols
(which although unnamed, contain the `.o` path).
* Generated in `is_official_build=true` builds if `generate_linker_map` is
true. In official builds on Android generate_linker_map is true by default.
1. `.o` files are mapped to `.cc` files by parsing `.ninja` files.
* This means that `.h` files are never listed as sources. No information
about inlined symbols is gathered.
......
......@@ -1507,8 +1507,8 @@ def DeduceMainPaths(args, parser):
map_path += '.gz'
if not os.path.exists(map_path):
parser.error('Could not find .map(.gz)? file. Ensure you have built with '
'is_official_build=true, or use --map-file to point me a '
'linker map file.')
'is_official_build=true and generate_linker_map=true, or '
'use --map-file to point me a linker map file.')
linker_name = _DetectLinkerName(map_path)
logging.info('Linker name: %s' % linker_name)
......
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