Chromium Code Reviews| Index: build/android/gyp/strip_library_for_device.py |
| diff --git a/build/android/gyp/strip_library_for_device.py b/build/android/gyp/strip_library_for_device.py |
| index ce23993ac20cc93d9779c5a8adca78e93ccdcd1f..2d7433d6aa03521009fa97c199943423cf456a3c 100755 |
| --- a/build/android/gyp/strip_library_for_device.py |
| +++ b/build/android/gyp/strip_library_for_device.py |
| @@ -4,7 +4,6 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| -import json |
| import optparse |
| import os |
| import sys |
| @@ -21,8 +20,11 @@ def StripLibrary(android_strip, android_strip_args, library_path, output_path): |
|
newt (away)
2014/08/11 23:55:23
please save extra newline for use elsewhere
cjhopman
2014/08/18 01:21:11
Done.
|
| -def main(): |
| +def main(args): |
| + args = build_utils.ExpandFileArgs(args) |
| + |
| parser = optparse.OptionParser() |
| + build_utils.AddDepfileOption(parser) |
| parser.add_option('--android-strip', |
| help='Path to the toolchain\'s strip binary') |
| @@ -32,15 +34,14 @@ def main(): |
| help='Directory for un-stripped libraries') |
| parser.add_option('--stripped-libraries-dir', |
| help='Directory for stripped libraries') |
| - parser.add_option('--libraries-file', |
| - help='Path to json file containing list of libraries') |
| + parser.add_option('--libraries', |
| + help='List of libraries to strip') |
| parser.add_option('--stamp', help='Path to touch on success') |
| - options, _ = parser.parse_args() |
| + options, _ = parser.parse_args(args) |
| - with open(options.libraries_file, 'r') as libfile: |
| - libraries = json.load(libfile) |
| + libraries = build_utils.ParseGypList(options.libraries) |
| build_utils.MakeDirectory(options.stripped_libraries_dir) |
| @@ -59,4 +60,4 @@ def main(): |
| if __name__ == '__main__': |
| - sys.exit(main()) |
| + sys.exit(main(sys.argv[1:])) |