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

Side by Side Diff: build/linux/dump_app_syms.py

Issue 2625913002: Fix check for when symbols are out of date. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Helper script to run dump_syms on Chrome Linux executables and strip 5 # Helper script to run dump_syms on Chrome Linux executables and strip
6 # them if needed. 6 # them if needed.
7 7
8 import os 8 import os
9 import subprocess 9 import subprocess
10 import sys 10 import sys
11 11
12 if len(sys.argv) != 5: 12 if len(sys.argv) != 5:
13 print "dump_app_syms.py <dump_syms_exe> <strip_binary>" 13 print "dump_app_syms.py <dump_syms_exe> <strip_binary>"
14 print " <binary_with_symbols> <symbols_output>" 14 print " <binary_with_symbols> <symbols_output>"
15 sys.exit(1) 15 sys.exit(1)
16 16
17 dumpsyms = sys.argv[1] 17 dumpsyms = sys.argv[1]
18 strip_binary = sys.argv[2] 18 strip_binary = sys.argv[2]
19 infile = sys.argv[3] 19 infile = sys.argv[3]
20 outfile = sys.argv[4] 20 outfile = sys.argv[4]
21 21
22 # Dump only when the output file is out-of-date. 22 # Dump only when the output file is out-of-date.
23 if not os.path.isfile(outfile) or \ 23 if not os.path.isfile(outfile) or \
24 os.stat(outfile).st_mtime > os.stat(infile).st_mtime: 24 os.stat(outfile).st_mtime < os.stat(infile).st_mtime:
25 with open(outfile, 'w') as outfileobj: 25 with open(outfile, 'w') as outfileobj:
26 subprocess.check_call([dumpsyms, infile], stdout=outfileobj) 26 subprocess.check_call([dumpsyms, infile], stdout=outfileobj)
27 27
28 if strip_binary != '0': 28 if strip_binary != '0':
29 subprocess.check_call(['strip', infile]) 29 subprocess.check_call(['strip', infile])
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698