Chromium Code Reviews| Index: build/android/gyp/util/build_utils.py |
| diff --git a/build/android/gyp/util/build_utils.py b/build/android/gyp/util/build_utils.py |
| index cd62c2fce1c948f92e2b150ee99d8c089709c1f9..3fa91aabf5d0f20779c5412d12fbc5978d53fbd4 100644 |
| --- a/build/android/gyp/util/build_utils.py |
| +++ b/build/android/gyp/util/build_utils.py |
| @@ -471,11 +471,18 @@ def ExpandFileArgs(args): |
| def CallAndWriteDepfileIfStale(function, options, record_path=None, |
| input_paths=None, input_strings=None, |
| output_paths=None, force=False, |
| - pass_changes=False): |
| + pass_changes=False, |
| + depfile_deps=None): |
| """Wraps md5_check.CallAndRecordIfStale() and also writes dep & stamp files. |
| Depfiles and stamp files are automatically added to output_paths when present |
| in the |options| argument. They are then created after |function| is called. |
| + |
| + By default, only python dependencies are added to the depfile. If there are |
| + other input paths that are not captured by GN deps, then they should be listed |
| + in depfile_deps. It's important to write paths to the depfile that are already |
| + captured by GN deps since GN args can cause GN deps to change, and such |
| + changes are not immediately reflected in depfiles (http://crbug.com/589311). |
| """ |
| if not output_paths: |
| raise Exception('At least one output_path must be specified.') |
| @@ -499,7 +506,10 @@ def CallAndWriteDepfileIfStale(function, options, record_path=None, |
| args = (changes,) if pass_changes else () |
| function(*args) |
| if python_deps is not None: |
| - WriteDepfile(options.depfile, python_deps + input_paths) |
|
jbudorick
2016/03/09 16:31:08
What happened to input_paths?
agrieve
2016/03/11 15:21:13
That's the fix. Have a look at the new comment I a
jbudorick
2016/03/11 15:24:17
definitely skipped right through that comment the
|
| + all_depfile_deps = list(python_deps) |
| + if depfile_deps: |
| + all_depfile_deps.extend(depfile_deps) |
| + WriteDepfile(options.depfile, all_depfile_deps) |
| if stamp_file: |
| Touch(stamp_file) |