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

Unified Diff: pylib/gyp/__init__.py

Issue 10909158: Add support for building targets directly from gyp. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 8 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
Index: pylib/gyp/__init__.py
diff --git a/pylib/gyp/__init__.py b/pylib/gyp/__init__.py
index ba1ca07ba51a6636adcb20036cd06e731a2f6cf4..4aae35605116215f93178256ac4dcebad7c79f75 100755
--- a/pylib/gyp/__init__.py
+++ b/pylib/gyp/__init__.py
@@ -314,6 +314,8 @@ def gyp_main(args):
parser.add_option('--toplevel-dir', dest='toplevel_dir', action='store',
default=None, metavar='DIR', type='path',
help='directory to use as the root of the source tree')
+ parser.add_option('--build', dest='configs', action='append',
+ help='configuration for build after project generation')
# --no-circular-check disables the check for circular relationships between
# .gyp files. These relationships should not exist, but they've only been
# observed to be harmful with the Xcode generator. Chromium's .gyp files
@@ -496,6 +498,13 @@ def gyp_main(args):
# generate targets in the order specified in flat_list.
generator.GenerateOutput(flat_list, targets, data, params)
+ if options.configs:
+ valid_configs = targets[flat_list[0]]['configurations'].keys()
+ for conf in options.configs:
+ if conf not in valid_configs:
+ raise GypError("Invalid config specified via --build: %s" % conf)
bradn 2012/09/18 00:22:39 single quotes
Sam Clegg 2012/09/18 00:47:17 Done.
+ generator.PerformBuild(data, options.configs, params)
+
# Done
return 0

Powered by Google App Engine
This is Rietveld 408576698