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

Side by Side Diff: components/cronet/tools/link_dependencies.py

Issue 1858483002: Cronet for iOS with C API for GRPC support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@small
Patch Set: Use LazyInitializer, wait for stopLogOnNetworkThread. Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 3 # Copyright 2014 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 """Links the deps of a binary into a static library. 7 """Links the deps of a binary into a static library.
8 8
9 Run with a working directory, the name of a binary target, and the name of the 9 Run with a working directory, the name of a binary target, and the name of the
10 static library that should be produced. For example: 10 static library that should be produced. For example:
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 targets: list of targets to include library dependencies from 108 targets: list of targets to include library dependencies from
109 workdir: working directory to run ninja queries in 109 workdir: working directory to run ninja queries in
110 query: function taking target, workdir, and prefix and returning an input 110 query: function taking target, workdir, and prefix and returning an input
111 set 111 set
112 Returns: 112 Returns:
113 Set of library dependencies. 113 Set of library dependencies.
114 """ 114 """
115 deps = set() 115 deps = set()
116 for target in targets: 116 for target in targets:
117 if is_library(target): 117 if is_library(target):
118 deps.add(os.path.join(workdir, target)) 118 if not 'boringssl' in target:
119 deps.add(os.path.join(workdir, target))
119 else: 120 else:
120 deps = deps.union(query(target, workdir, workdir)) 121 deps = deps.union(query(target, workdir, workdir))
121 return deps 122 return deps
122 123
123 124
124 def link(output, inputs): 125 def link(output, inputs):
125 """Links output from inputs using libtool. 126 """Links output from inputs using libtool.
126 127
127 Args: 128 Args:
128 output: file system path to desired output library 129 output: file system path to desired output library
(...skipping 19 matching lines...) Expand all
148 parser.add_argument('target', nargs=1, help='target to query for deps') 149 parser.add_argument('target', nargs=1, help='target to query for deps')
149 parser.add_argument('output', nargs=1, help='path to output static library') 150 parser.add_argument('output', nargs=1, help='path to output static library')
150 args = parser.parse_args() 151 args = parser.parse_args()
151 152
152 inputs = query_ninja(args.target[0], args.workdir[0]) 153 inputs = query_ninja(args.target[0], args.workdir[0])
153 link(args.output[0], list(library_deps(inputs, args.workdir[0]))) 154 link(args.output[0], list(library_deps(inputs, args.workdir[0])))
154 155
155 156
156 if __name__ == '__main__': 157 if __name__ == '__main__':
157 main() 158 main()
OLDNEW
« components/cronet/ios/test/quic_test_server.cc ('K') | « components/cronet/tools/cr_cronet.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698