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

Side by Side Diff: build/android/gyp/strip_library_for_device.py

Issue 197693002: [Android] Lint build/android/gyp/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: now using extra_paths_list to avoid F0401s Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « build/android/gyp/push_libraries.py ('k') | build/android/gyp/util/build_device.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import json 7 import json
8 import optparse 8 import optparse
9 import os 9 import os
10 import sys 10 import sys
11 11
12 from util import build_utils 12 from util import build_utils
13 13
14 14
15 def StripLibrary(android_strip, android_strip_args, library_path, output_path): 15 def StripLibrary(android_strip, android_strip_args, library_path, output_path):
16 if build_utils.IsTimeStale(output_path, [library_path]): 16 if build_utils.IsTimeStale(output_path, [library_path]):
17 strip_cmd = ([android_strip] + 17 strip_cmd = ([android_strip] +
18 android_strip_args + 18 android_strip_args +
19 ['-o', output_path, library_path]) 19 ['-o', output_path, library_path])
20 build_utils.CheckOutput(strip_cmd) 20 build_utils.CheckOutput(strip_cmd)
21 21
22 22
23 23
24 def main(argv): 24 def main():
25 parser = optparse.OptionParser() 25 parser = optparse.OptionParser()
26 26
27 parser.add_option('--android-strip', 27 parser.add_option('--android-strip',
28 help='Path to the toolchain\'s strip binary') 28 help='Path to the toolchain\'s strip binary')
29 parser.add_option('--android-strip-arg', action='append', 29 parser.add_option('--android-strip-arg', action='append',
30 help='Argument to be passed to strip') 30 help='Argument to be passed to strip')
31 parser.add_option('--libraries-dir', 31 parser.add_option('--libraries-dir',
32 help='Directory for un-stripped libraries') 32 help='Directory for un-stripped libraries')
33 parser.add_option('--stripped-libraries-dir', 33 parser.add_option('--stripped-libraries-dir',
34 help='Directory for stripped libraries') 34 help='Directory for stripped libraries')
(...skipping 14 matching lines...) Expand all
49 stripped_library_path = os.path.join( 49 stripped_library_path = os.path.join(
50 options.stripped_libraries_dir, library) 50 options.stripped_libraries_dir, library)
51 StripLibrary(options.android_strip, options.android_strip_arg, library_path, 51 StripLibrary(options.android_strip, options.android_strip_arg, library_path,
52 stripped_library_path) 52 stripped_library_path)
53 53
54 if options.stamp: 54 if options.stamp:
55 build_utils.Touch(options.stamp) 55 build_utils.Touch(options.stamp)
56 56
57 57
58 if __name__ == '__main__': 58 if __name__ == '__main__':
59 sys.exit(main(sys.argv)) 59 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/gyp/push_libraries.py ('k') | build/android/gyp/util/build_device.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698