Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: tools/binary_size/libsupersize/archive.py

Issue 2817553003: //tools/binary_size: Fix source paths for linux builds (Closed)
Patch Set: add exclude_unwind_tables Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/binary_size/README.md ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/binary_size/libsupersize/archive.py
diff --git a/tools/binary_size/libsupersize/archive.py b/tools/binary_size/libsupersize/archive.py
index 7524094731b9b2acea8cc0ba1068f95584c84933..0991f0b8c6be2af46dd509063ffe273bc5130acb 100644
--- a/tools/binary_size/libsupersize/archive.py
+++ b/tools/binary_size/libsupersize/archive.py
@@ -135,23 +135,23 @@ def _ExtractSourcePaths(symbols, output_directory):
Returns True if source paths were found.
"""
- all_found = True
mapper = ninja_parser.SourceFileMapper(output_directory)
+ not_found_paths = set()
for symbol in symbols:
object_path = symbol.object_path
if symbol.source_path or not object_path:
continue
# We don't have source info for prebuilt .a files.
- if not object_path.startswith('..'):
+ if not os.path.isabs(object_path) and not object_path.startswith('..'):
source_path = mapper.FindSourceForPath(object_path)
if source_path:
symbol.source_path = _NormalizeSourcePath(source_path)
- else:
- all_found = False
+ elif object_path not in not_found_paths:
+ not_found_paths.add(object_path)
logging.warning('Could not find source path for %s', object_path)
logging.debug('Parsed %d .ninja files.', mapper.GetParsedFileCount())
- return all_found
+ return len(not_found_paths) == 0
def _CalculatePadding(symbols):
« no previous file with comments | « tools/binary_size/README.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698