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 65b1a643c26a2ca920ff176af40bfcad85057f3d..89ebd364c9901ad5ce38e6b7713f578e5983b80a 100644 |
| --- a/build/android/gyp/util/build_utils.py |
| +++ b/build/android/gyp/util/build_utils.py |
| @@ -323,9 +323,13 @@ def GetPythonDependencies(): |
| def AddDepfileOption(parser): |
| - parser.add_option('--depfile', |
| - help='Path to depfile. This must be specified as the ' |
| - 'action\'s first output.') |
| + # Support both argparse and optparse. |
|
jbudorick
2015/08/23 02:01:28
TODO to get rid of this once we've moved to argpar
agrieve
2015/08/26 00:22:39
Done.
|
| + if hasattr(parser, 'add_option'): |
| + func = parser.add_option |
| + else: |
| + func = parser.add_argument |
| + func('--depfile', |
| + help='Path to depfile. Must be specified as the action\'s first output.') |
| def WriteDepfile(path, dependencies): |