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..9e2daae33acfa057f23eb2c53b1cd6ed47c9bfb5 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 |
@@ -20,9 +19,11 @@ def StripLibrary(android_strip, android_strip_args, library_path, output_path): |
build_utils.CheckOutput(strip_cmd) |
+def main(args): |
+ args = build_utils.ExpandFileArgs(args) |
-def main(): |
parser = optparse.OptionParser() |
+ build_utils.AddDepfileOption(parser) |
parser.add_option('--android-strip', |
help='Path to the toolchain\'s strip binary') |
@@ -32,15 +33,13 @@ 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(args) |
- options, _ = parser.parse_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 +58,4 @@ def main(): |
if __name__ == '__main__': |
- sys.exit(main()) |
+ sys.exit(main(sys.argv[1:])) |