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

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

Issue 557463002: Make base_unittests_apk actually work (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-group-datadeps
Patch Set: Rebase Created 6 years, 3 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 | « base/test/BUILD.gn ('k') | build/android/pylib/gtest/setup.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 """Writes dependency ordered list of native libraries. 7 """Writes dependency ordered list of native libraries.
8 8
9 The list excludes any Android system libraries, as those are not bundled with 9 The list excludes any Android system libraries, as those are not bundled with
10 the APK. 10 the APK.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 else: 89 else:
90 assert len(binaries) == 1 90 assert len(binaries) == 1
91 all_deps = GetDependencies(binaries[0]) 91 all_deps = GetDependencies(binaries[0])
92 libraries = [lib for lib in all_deps if not IsSystemLibrary(lib)] 92 libraries = [lib for lib in all_deps if not IsSystemLibrary(lib)]
93 93
94 return GetSortedTransitiveDependencies(libraries) 94 return GetSortedTransitiveDependencies(libraries)
95 95
96 96
97 def main(): 97 def main():
98 parser = optparse.OptionParser() 98 parser = optparse.OptionParser()
99 build_utils.AddDepfileOption(parser)
99 100
100 parser.add_option('--input-libraries', 101 parser.add_option('--input-libraries',
101 help='A list of top-level input libraries.') 102 help='A list of top-level input libraries.')
102 parser.add_option('--libraries-dir', 103 parser.add_option('--libraries-dir',
103 help='The directory which contains shared libraries.') 104 help='The directory which contains shared libraries.')
104 parser.add_option('--readelf', help='Path to the readelf binary.') 105 parser.add_option('--readelf', help='Path to the readelf binary.')
105 parser.add_option('--output', help='Path to the generated .json file.') 106 parser.add_option('--output', help='Path to the generated .json file.')
106 parser.add_option('--stamp', help='Path to touch on success.') 107 parser.add_option('--stamp', help='Path to touch on success.')
107 108
108 options, _ = parser.parse_args() 109 options, _ = parser.parse_args()
(...skipping 10 matching lines...) Expand all
119 '{%s}' % ','.join(['"%s"' % s[3:-3] for s in libraries])) 120 '{%s}' % ','.join(['"%s"' % s[3:-3] for s in libraries]))
120 121
121 build_utils.WriteJson( 122 build_utils.WriteJson(
122 {'libraries': libraries, 'java_libraries_list': java_libraries_list}, 123 {'libraries': libraries, 'java_libraries_list': java_libraries_list},
123 options.output, 124 options.output,
124 only_if_changed=True) 125 only_if_changed=True)
125 126
126 if options.stamp: 127 if options.stamp:
127 build_utils.Touch(options.stamp) 128 build_utils.Touch(options.stamp)
128 129
130 if options.depfile:
131 print libraries
132 build_utils.WriteDepfile(
133 options.depfile,
134 libraries + build_utils.GetPythonDependencies())
135
129 136
130 if __name__ == '__main__': 137 if __name__ == '__main__':
131 sys.exit(main()) 138 sys.exit(main())
132 139
133 140
OLDNEW
« no previous file with comments | « base/test/BUILD.gn ('k') | build/android/pylib/gtest/setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698