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

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

Issue 334783006: Allow the mojo shell to run on android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | build/android/write_ordered_libraries.gypi » ('j') | build/java_apk.gypi » ('J')
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 parser.add_option('--libraries-dir', 99 parser.add_option('--libraries-dir',
100 help='The directory which contains shared libraries.') 100 help='The directory which contains shared libraries.')
101 parser.add_option('--readelf', help='Path to the readelf binary.') 101 parser.add_option('--readelf', help='Path to the readelf binary.')
102 parser.add_option('--output', help='Path to the generated .json file.') 102 parser.add_option('--output', help='Path to the generated .json file.')
103 parser.add_option('--stamp', help='Path to touch on success.') 103 parser.add_option('--stamp', help='Path to touch on success.')
104 104
105 global _options 105 global _options
106 _options, _ = parser.parse_args() 106 _options, _ = parser.parse_args()
107 107
108 libraries = build_utils.ParseGypList(_options.input_libraries) 108 libraries = build_utils.ParseGypList(_options.input_libraries)
109 if libraries[0].endswith('.so'): 109 if len(libraries):
110 libraries = [os.path.basename(lib) for lib in libraries] 110 if libraries[0].endswith('.so'):
111 libraries = GetSortedTransitiveDependencies(libraries) 111 libraries = [os.path.basename(lib) for lib in libraries]
112 else: 112 libraries = GetSortedTransitiveDependencies(libraries)
113 libraries = GetSortedTransitiveDependenciesForExecutable(libraries[0]) 113 else:
114 libraries = GetSortedTransitiveDependenciesForExecutable(libraries[0])
114 115
115 build_utils.WriteJson(libraries, _options.output, only_if_changed=True) 116 build_utils.WriteJson(libraries, _options.output, only_if_changed=True)
116 117
117 if _options.stamp: 118 if _options.stamp:
118 build_utils.Touch(_options.stamp) 119 build_utils.Touch(_options.stamp)
119 120
120 121
121 if __name__ == '__main__': 122 if __name__ == '__main__':
122 sys.exit(main()) 123 sys.exit(main())
123 124
124 125
OLDNEW
« no previous file with comments | « no previous file | build/android/write_ordered_libraries.gypi » ('j') | build/java_apk.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698