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

Side by Side Diff: site_scons/site_tools/library_deps.py

Issue 10919162: [MIPS] Implementation of sel_ldr for MIPS architecture. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Rebase (Saturday morning). Created 8 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 | « SConstruct ('k') | src/include/concurrency_ops.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 1 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Harness for defining library dependencies for scons files.""" 5 """Harness for defining library dependencies for scons files."""
6 6
7 7
8 # The following is a map from a library, to the corresponding 8 # The following is a map from a library, to the corresponding
9 # list of dependent libraries that must be included after that library, in 9 # list of dependent libraries that must be included after that library, in
10 # the list of libraries. 10 # the list of libraries.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 ], 179 ],
180 'validators': [ 180 'validators': [
181 'ncvalidate_arm_v2', 181 'ncvalidate_arm_v2',
182 ], 182 ],
183 }, 183 },
184 'arm-thumb2': { 184 'arm-thumb2': {
185 'ncvalidate_arm_v2': [ 185 'ncvalidate_arm_v2': [
186 'arm_validator_core', 186 'arm_validator_core',
187 ], 187 ],
188 }, 188 },
189 'mips32': {
190 'ncvalidate_mips': [
191 'mips_validator_core',
192 ],
193 'validators': [
194 'ncvalidate_mips',
195 ],
196 },
189 } 197 }
190 198
191 199
192 def AddLibDeps(env, platform, libraries): 200 def AddLibDeps(env, platform, libraries):
193 """ Adds dependent libraries to list of libraries. 201 """ Adds dependent libraries to list of libraries.
194 202
195 Computes the transitive closure of library dependencies for each library 203 Computes the transitive closure of library dependencies for each library
196 in the given list. Dependent libraries are added after libraries 204 in the given list. Dependent libraries are added after libraries
197 as defined in LIBRARY_DEPENDENCIES, unless there is a cycle. If 205 as defined in LIBRARY_DEPENDENCIES, unless there is a cycle. If
198 a cycle occurs, it is broken and the remaining (acyclic) graph 206 a cycle occurs, it is broken and the remaining (acyclic) graph
(...skipping 11 matching lines...) Expand all
210 def VisitList(libraries): 218 def VisitList(libraries):
211 for library in reversed(libraries): 219 for library in reversed(libraries):
212 if library not in visited: 220 if library not in visited:
213 VisitLibrary(library) 221 VisitLibrary(library)
214 222
215 def GetLibraryDeps(library): 223 def GetLibraryDeps(library):
216 ret = (LIBRARY_DEPENDENCIES_DEFAULT.get(library, []) + 224 ret = (LIBRARY_DEPENDENCIES_DEFAULT.get(library, []) +
217 PLATFORM_LIBRARY_DEPENDENCIES.get(platform, {}).get(library, [])) 225 PLATFORM_LIBRARY_DEPENDENCIES.get(platform, {}).get(library, []))
218 if env['NACL_BUILD_FAMILY'] != 'TRUSTED': 226 if env['NACL_BUILD_FAMILY'] != 'TRUSTED':
219 ret.extend(UNTRUSTED_LIBRARY_DEPENDENCIES.get(library, [])) 227 ret.extend(UNTRUSTED_LIBRARY_DEPENDENCIES.get(library, []))
220 if library == 'validators' and not env.Bit('target_arm'): 228 if library == 'validators' and env.Bit('target_x86'):
221 if env.Bit('validator_ragel'): 229 if env.Bit('validator_ragel'):
222 ret.append(env.NaClTargetArchSuffix('dfa_validate_caller')) 230 ret.append(env.NaClTargetArchSuffix('dfa_validate_caller'))
223 else: 231 else:
224 ret.append(env.NaClTargetArchSuffix('ncvalidate')) 232 ret.append(env.NaClTargetArchSuffix('ncvalidate'))
225 return ret 233 return ret
226 234
227 def VisitLibrary(library): 235 def VisitLibrary(library):
228 visited.add(library) 236 visited.add(library)
229 VisitList(GetLibraryDeps(library)) 237 VisitList(GetLibraryDeps(library))
230 closure.append(library) 238 closure.append(library)
231 239
232 # Ideally we would just do "VisitList(libraries)" here, but some 240 # Ideally we would just do "VisitList(libraries)" here, but some
233 # PPAPI tests (specifically, tests/ppapi_gles_book) list "ppapi_cpp" 241 # PPAPI tests (specifically, tests/ppapi_gles_book) list "ppapi_cpp"
234 # twice in the link line, and we need to maintain these duplicates. 242 # twice in the link line, and we need to maintain these duplicates.
235 for library in reversed(libraries): 243 for library in reversed(libraries):
236 VisitLibrary(library) 244 VisitLibrary(library)
237 245
238 closure.reverse() 246 closure.reverse()
239 return closure 247 return closure
OLDNEW
« no previous file with comments | « SConstruct ('k') | src/include/concurrency_ops.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698