Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3819)

Unified Diff: build/android/gyp/strip_library_for_device.py

Issue 456493002: Add native libraries to gn apks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/gyp/push_libraries.py ('k') | build/android/gyp/write_build_config.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:]))
« no previous file with comments | « build/android/gyp/push_libraries.py ('k') | build/android/gyp/write_build_config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698