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

Side by Side Diff: tools/gn/bin/gyp_flag_compare.py

Issue 568613002: gn: use bundled binutils via -B (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-various-matching
Patch Set: match condition in gyp Created 6 years, 3 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 | « build/config/compiler/BUILD.gn ('k') | 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright 2014 The Chromium Authors. All rights reserved. 3 # Copyright 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Given the output of -t commands from a ninja build for a gyp and GN generated 7 """Given the output of -t commands from a ninja build for a gyp and GN generated
8 build, report on differences between the command lines.""" 8 build, report on differences between the command lines."""
9 9
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 # Filter for libFindBadConstructs.so having a relative path in one and 106 # Filter for libFindBadConstructs.so having a relative path in one and
107 # absolute path in the other. 107 # absolute path in the other.
108 others_filtered = [] 108 others_filtered = []
109 for x in others: 109 for x in others:
110 if x.startswith('-Xclang ') and x.endswith('libFindBadConstructs.so'): 110 if x.startswith('-Xclang ') and x.endswith('libFindBadConstructs.so'):
111 others_filtered.append( 111 others_filtered.append(
112 '-Xclang ' + 112 '-Xclang ' +
113 os.path.join(os.getcwd(), 113 os.path.join(os.getcwd(),
114 os.path.normpath( 114 os.path.normpath(
115 os.path.join('out/gn_flags', x.split(' ', 1)[1])))) 115 os.path.join('out/gn_flags', x.split(' ', 1)[1]))))
116 elif x.startswith('-B'):
117 others_filtered.append(
118 '-B' +
119 os.path.join(os.getcwd(),
120 os.path.normpath(os.path.join('out/gn_flags', x[2:]))))
116 else: 121 else:
117 others_filtered.append(x) 122 others_filtered.append(x)
118 others = others_filtered 123 others = others_filtered
119 124
120 flags_by_output[cc_file[0]] = { 125 flags_by_output[cc_file[0]] = {
121 'output': output_name, 126 'output': output_name,
122 'depname': dep_name, 127 'depname': dep_name,
123 'defines': sorted(defines), 128 'defines': sorted(defines),
124 'include_dirs': sorted(include_dirs), # TODO(scottmg): This is wrong. 129 'include_dirs': sorted(include_dirs), # TODO(scottmg): This is wrong.
125 'dash_f': sorted(dash_f), 130 'dash_f': sorted(dash_f),
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 print '\n'.join(sorted(files)) 218 print '\n'.join(sorted(files))
214 print diff 219 print diff
215 220
216 print 'Total differences:', g_total_differences 221 print 'Total differences:', g_total_differences
217 # TODO(scottmg): Return failure on difference once we're closer to identical. 222 # TODO(scottmg): Return failure on difference once we're closer to identical.
218 return 0 223 return 0
219 224
220 225
221 if __name__ == '__main__': 226 if __name__ == '__main__':
222 sys.exit(main()) 227 sys.exit(main())
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698