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

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

Issue 758223003: Cleanup: Use Bit('build_ARCH') instead of Bit('target_ARCH') (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fix + simplify Created 6 years 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 | « SConstruct ('k') | site_scons/site_tools/naclsdk.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 # 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 def VisitList(libraries): 160 def VisitList(libraries):
161 for library in reversed(libraries): 161 for library in reversed(libraries):
162 if library not in visited: 162 if library not in visited:
163 VisitLibrary(library) 163 VisitLibrary(library)
164 164
165 def GetLibraryDeps(library): 165 def GetLibraryDeps(library):
166 ret = (LIBRARY_DEPENDENCIES_DEFAULT.get(library, []) + 166 ret = (LIBRARY_DEPENDENCIES_DEFAULT.get(library, []) +
167 PLATFORM_LIBRARY_DEPENDENCIES.get(platform, {}).get(library, [])) 167 PLATFORM_LIBRARY_DEPENDENCIES.get(platform, {}).get(library, []))
168 if env['NACL_BUILD_FAMILY'] != 'TRUSTED': 168 if env['NACL_BUILD_FAMILY'] != 'TRUSTED':
169 ret.extend(UNTRUSTED_LIBRARY_DEPENDENCIES.get(library, [])) 169 ret.extend(UNTRUSTED_LIBRARY_DEPENDENCIES.get(library, []))
170 if library == 'validators' and env.Bit('target_x86'): 170 if library == 'validators' and env.Bit('build_x86'):
171 ret.append(env.NaClTargetArchSuffix('dfa_validate_caller')) 171 ret.append(env.NaClTargetArchSuffix('dfa_validate_caller'))
172 return ret 172 return ret
173 173
174 def VisitLibrary(library): 174 def VisitLibrary(library):
175 visited.add(library) 175 visited.add(library)
176 VisitList(GetLibraryDeps(library)) 176 VisitList(GetLibraryDeps(library))
177 closure.append(library) 177 closure.append(library)
178 178
179 # Ideally we would just do "VisitList(libraries)" here, but some 179 # Ideally we would just do "VisitList(libraries)" here, but some
180 # PPAPI tests (specifically, tests/ppapi_gles_book) list "ppapi_cpp" 180 # PPAPI tests (specifically, tests/ppapi_gles_book) list "ppapi_cpp"
181 # twice in the link line, and we need to maintain these duplicates. 181 # twice in the link line, and we need to maintain these duplicates.
182 for library in reversed(libraries): 182 for library in reversed(libraries):
183 VisitLibrary(library) 183 VisitLibrary(library)
184 184
185 closure.reverse() 185 closure.reverse()
186 return closure 186 return closure
OLDNEW
« no previous file with comments | « SConstruct ('k') | site_scons/site_tools/naclsdk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698