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

Unified Diff: tools/gyp_flag_compare.py

Issue 2310983002: Enable gyp_compare_flag_script to compare all targets. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gyp_flag_compare.py
diff --git a/tools/gyp_flag_compare.py b/tools/gyp_flag_compare.py
index 0c17b1a3356cc0298eb25353a76a3085c13875a0..2c878c1664e8ba9a93e3aed7febd9a7a9d16d029 100755
--- a/tools/gyp_flag_compare.py
+++ b/tools/gyp_flag_compare.py
@@ -20,6 +20,9 @@ follows:
When the GN and GYP target names differ, it should be called invoked as follows:
$ python tools/gyp_flag_compare.py gyp_dir gn_dir gyp_target gn_target
+When all targets want to be compared, it should be called without a target name,
+i.e.:
+ $ python tools/gyp_flag_compare.py gyp_dir gn_dir
This script can also be used interactively. Then ConfigureBuild can optionally
be used to generate ninja files with GYP and GN.
@@ -113,7 +116,7 @@ def CountsByDirname(dict_of_list):
class Comparison(object):
"""A comparison of the currently-configured build for a target."""
- def __init__(self, gyp_target, gn_target=None, gyp_dir=_DEFAULT_GYP_DIR,
+ def __init__(self, gyp_target="", gn_target=None, gyp_dir=_DEFAULT_GYP_DIR,
gn_dir=_DEFAULT_GN_DIR):
"""Creates a comparison of a GN and GYP target. If the target names differ
between the two build systems, then two names may be passed.
@@ -389,18 +392,20 @@ def Run(command_line):
def main():
- if len(sys.argv) < 4:
- print 'usage: %s gyp_dir gn_dir target' % __file__
+ if len(sys.argv) < 3:
+ print 'usage: %s gyp_dir gn_dir' % __file__
+ print ' or: %s gyp_dir gn_dir target' % __file__
print ' or: %s gyp_dir gn_dir gyp_target gn_target' % __file__
return 1
gyp_dir = sys.argv[1]
gn_dir = sys.argv[2]
- gyp_target = sys.argv[3]
- if len(sys.argv) == 4:
- gn_target = gyp_target
- else:
+ gyp_target = gn_target = ""
+
+ if len(sys.argv) > 3:
+ gyp_target = sys.argv[3]
+ if len(sys.argv) > 4:
gn_target = sys.argv[4]
print 'GYP output directory is %s' % gyp_dir
« 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