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

Unified Diff: build/toolchain/gcc_link_wrapper.py

Issue 2726983004: Output a linker map file for official builds (Closed)
Patch Set: linux Created 3 years, 9 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 | « build/toolchain/android/BUILD.gn ('k') | build/toolchain/gcc_solink_wrapper.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/gcc_link_wrapper.py
diff --git a/build/toolchain/gcc_link_wrapper.py b/build/toolchain/gcc_link_wrapper.py
index c589fe330d4c10926aa1411af00a1942ee56f7f4..0e256fab2fb672e54a638a660ab8399a5aac426f 100755
--- a/build/toolchain/gcc_link_wrapper.py
+++ b/build/toolchain/gcc_link_wrapper.py
@@ -15,6 +15,8 @@ import os
import subprocess
import sys
+import wrapper_utils
+
# When running on a Windows host and using a toolchain whose tools are
# actually wrapper scripts (i.e. .bat files on Windows) rather than binary
@@ -37,9 +39,12 @@ def main():
help='The strip binary to run',
metavar='PATH')
parser.add_argument('--unstripped-file',
- required=True,
help='Executable file produced by linking command',
metavar='FILE')
+ parser.add_argument('--map-file',
+ help=('Use --Wl,-Map to generate a map file. Will be '
+ 'gzipped if extension ends with .gz'),
+ metavar='FILE')
parser.add_argument('--output',
required=True,
help='Final output executable file',
@@ -51,7 +56,8 @@ def main():
# Work-around for gold being slow-by-default. http://crbug.com/632230
fast_env = dict(os.environ)
fast_env['LC_ALL'] = 'C'
- result = subprocess.call(CommandToRun(args.command), env=fast_env)
+ result = wrapper_utils.RunLinkWithOptionalMapFile(args.command, env=fast_env,
+ map_file=args.map_file)
if result != 0:
return result
« no previous file with comments | « build/toolchain/android/BUILD.gn ('k') | build/toolchain/gcc_solink_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698