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

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

Issue 1647353002: Use gn_helpers to [se]serialize GN lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@python_impl
Patch Set: more Created 4 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 unified diff | Download patch
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 help='The directory which contains shared libraries.') 104 help='The directory which contains shared libraries.')
105 parser.add_option('--readelf', help='Path to the readelf binary.') 105 parser.add_option('--readelf', help='Path to the readelf binary.')
106 parser.add_option('--output', help='Path to the generated .json file.') 106 parser.add_option('--output', help='Path to the generated .json file.')
107 parser.add_option('--stamp', help='Path to touch on success.') 107 parser.add_option('--stamp', help='Path to touch on success.')
108 108
109 options, _ = parser.parse_args(build_utils.ExpandFileArgs(sys.argv[1:])) 109 options, _ = parser.parse_args(build_utils.ExpandFileArgs(sys.argv[1:]))
110 110
111 SetReadelfPath(options.readelf) 111 SetReadelfPath(options.readelf)
112 SetLibraryDirs(options.libraries_dir.split(',')) 112 SetLibraryDirs(options.libraries_dir.split(','))
113 113
114 libraries = build_utils.ParseGypList(options.input_libraries) 114 libraries = build_utils.ParseGnList(options.input_libraries)
115 if len(libraries): 115 if len(libraries):
116 libraries = GetSortedTransitiveDependenciesForBinaries(libraries) 116 libraries = GetSortedTransitiveDependenciesForBinaries(libraries)
117 117
118 # Convert to "base" library names: e.g. libfoo.so -> foo 118 # Convert to "base" library names: e.g. libfoo.so -> foo
119 java_libraries_list = ( 119 java_libraries_list = (
120 '{%s}' % ','.join(['"%s"' % s[3:-3] for s in libraries])) 120 '{%s}' % ','.join(['"%s"' % s[3:-3] for s in libraries]))
121 121
122 out_json = { 122 out_json = {
123 'libraries': libraries, 123 'libraries': libraries,
124 'lib_paths': [FullLibraryPath(l) for l in libraries], 124 'lib_paths': [FullLibraryPath(l) for l in libraries],
(...skipping 10 matching lines...) Expand all
135 if options.depfile: 135 if options.depfile:
136 build_utils.WriteDepfile( 136 build_utils.WriteDepfile(
137 options.depfile, 137 options.depfile,
138 libraries + build_utils.GetPythonDependencies()) 138 libraries + build_utils.GetPythonDependencies())
139 139
140 140
141 if __name__ == '__main__': 141 if __name__ == '__main__':
142 sys.exit(main()) 142 sys.exit(main())
143 143
144 144
OLDNEW
« no previous file with comments | « build/android/gyp/write_build_config.py ('k') | build/android/incremental_install/create_install_script.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698