Chromium Code Reviews| Index: pylib/gyp/__init__.py |
| diff --git a/pylib/gyp/__init__.py b/pylib/gyp/__init__.py |
| index 54488e5e6bb2b9c53efea0291fcf7fc29496489c..1b0167c19927a4509da98a5f8269500d3a4d3ab1 100755 |
| --- a/pylib/gyp/__init__.py |
| +++ b/pylib/gyp/__init__.py |
| @@ -52,7 +52,8 @@ class GypError(Exception): |
| def Load(build_files, format, default_variables={}, |
| - includes=[], depth='.', params=None, check=False, circular_check=True): |
| + includes=[], depth='.', params=None, check=False, |
| + circular_check=True, parallel=False): |
| """ |
| Loads one or more specified build files. |
| default_variables and includes will be copied before use. |
| @@ -130,7 +131,8 @@ def Load(build_files, format, default_variables={}, |
| # Process the input specific to this generator. |
| result = gyp.input.Load(build_files, default_variables, includes[:], |
| - depth, generator_input_info, check, circular_check) |
| + depth, generator_input_info, check, circular_check, |
| + parallel) |
| return [generator] + result |
| def NameValueListToDict(name_value_list): |
| @@ -317,6 +319,10 @@ def gyp_main(args): |
| help='do not read options from environment variables') |
| parser.add_option('--check', dest='check', action='store_true', |
| help='check format of gyp files') |
| + parser.add_option('--parallel', dest='parallel', action='store_true', |
|
M-A Ruel
2012/09/18 19:42:18
Remove parameter dest='parallel'
it's not needed.
dmazzoni
2012/09/19 21:14:52
Done.
|
| + env_name='GYP_PARALLEL', |
| + regenerate=False, |
|
M-A Ruel
2012/09/18 19:42:18
What's regenerate?
dmazzoni
2012/09/19 21:14:52
Looks like this isn't needed if 'dest' isn't used.
|
| + help='Use multiprocessing for speed (experimental)') |
| 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') |
| @@ -374,6 +380,11 @@ def gyp_main(args): |
| if g_o: |
| options.generator_output = g_o |
| + if not options.parallel and options.use_environment: |
| + parallel = os.environ.get('GYP_PARALLEL') |
|
M-A Ruel
2012/09/18 19:42:18
options.parallel = bool(os.environ.get('GYP_PARALL
dmazzoni
2012/09/19 21:14:52
Done.
|
| + if parallel: |
| + options.parallel = True |
| + |
| for mode in options.debug: |
| gyp.debug[mode] = 1 |
| @@ -491,7 +502,8 @@ def gyp_main(args): |
| cmdline_default_variables, |
| includes, options.depth, |
| params, options.check, |
| - options.circular_check) |
| + options.circular_check, |
| + options.parallel) |
| # TODO(mark): Pass |data| for now because the generator needs a list of |
| # build files that came in. In the future, maybe it should just accept |