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

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

Issue 19244003: android/gyp/jar_toc.py: avoid specifying conflicting flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 """Creates a TOC file from a Java jar. 7 """Creates a TOC file from a Java jar.
8 8
9 The TOC file contains the non-package API of the jar. This includes all 9 The TOC file contains the non-package API of the jar. This includes all
10 public/protected classes/functions/members and the values of static final 10 public/protected classes/functions/members and the values of static final
(...skipping 20 matching lines...) Expand all
31 for f in files: 31 for f in files:
32 if f.endswith('.class'): 32 if f.endswith('.class'):
33 # f is of the form org/chromium/base/Class$Inner.class 33 # f is of the form org/chromium/base/Class$Inner.class
34 classes.append(f.replace('/', '.')[:-6]) 34 classes.append(f.replace('/', '.')[:-6])
35 return classes 35 return classes
36 36
37 37
38 def CallJavap(classpath, classes): 38 def CallJavap(classpath, classes):
39 javap_cmd = [ 39 javap_cmd = [
40 'javap', 40 'javap',
41 '-public', 41 '-protected', # In reality both public & protected.
42 '-protected',
43 # -verbose is required to get constant values (which can be inlined in 42 # -verbose is required to get constant values (which can be inlined in
44 # dependents). 43 # dependents).
45 '-verbose', 44 '-verbose',
46 '-classpath', classpath 45 '-classpath', classpath
47 ] + classes 46 ] + classes
48 return build_utils.CheckCallDie(javap_cmd, suppress_output=True) 47 return build_utils.CheckCallDie(javap_cmd, suppress_output=True)
49 48
50 49
51 def ExtractToc(disassembled_classes): 50 def ExtractToc(disassembled_classes):
52 # javap output is structured by indent (2-space) levels. 51 # javap output is structured by indent (2-space) levels.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 options, _ = parser.parse_args() 101 options, _ = parser.parse_args()
103 102
104 DoJarToc(options) 103 DoJarToc(options)
105 104
106 if options.stamp: 105 if options.stamp:
107 build_utils.Touch(options.stamp) 106 build_utils.Touch(options.stamp)
108 107
109 108
110 if __name__ == '__main__': 109 if __name__ == '__main__':
111 sys.exit(main(sys.argv)) 110 sys.exit(main(sys.argv))
112
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698