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

Side by Side Diff: native_client_sdk/src/tools/lib/get_shared_deps.py

Issue 1243823002: [NaCl SDK] Second phase of enable glibc arm toolchain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@reenable_irtext
Patch Set: Created 5 years, 5 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 | « native_client_sdk/src/tools/create_nmf.py ('k') | native_client_sdk/src/tools/nacl_gcc.mk » ('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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium 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 """Helper script to close over all transitive dependencies of a given .nexe 5 """Helper script to close over all transitive dependencies of a given .nexe
6 executable. 6 executable.
7 7
8 e.g. Given 8 e.g. Given
9 A -> B 9 A -> B
10 B -> C 10 B -> C
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if dynamic: 82 if dynamic:
83 return _GetNeededDynamic(main_files, objdump, lib_path) 83 return _GetNeededDynamic(main_files, objdump, lib_path)
84 else: 84 else:
85 return _GetNeededStatic(main_files) 85 return _GetNeededStatic(main_files)
86 86
87 87
88 def _GetNeededDynamic(main_files, objdump, lib_path): 88 def _GetNeededDynamic(main_files, objdump, lib_path):
89 examined = set() 89 examined = set()
90 all_files, unexamined = GleanFromObjdump(main_files, None, objdump, lib_path) 90 all_files, unexamined = GleanFromObjdump(main_files, None, objdump, lib_path)
91 for arch in all_files.itervalues(): 91 for arch in all_files.itervalues():
92 if unexamined: 92 if unexamined and arch != 'arm':
93 unexamined.add((RUNNABLE_LD, arch)) 93 unexamined.add((RUNNABLE_LD, arch))
94 94
95 while unexamined: 95 while unexamined:
96 files_to_examine = {} 96 files_to_examine = {}
97 97
98 # Take all the currently unexamined files and group them 98 # Take all the currently unexamined files and group them
99 # by architecture. 99 # by architecture.
100 for name, arch in unexamined: 100 for name, arch in unexamined:
101 files_to_examine.setdefault(arch, []).append(name) 101 files_to_examine.setdefault(arch, []).append(name)
102 102
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 raise Error('cannot find library %s' % name) 224 raise Error('cannot find library %s' % name)
225 return files 225 return files
226 226
227 227
228 def _GetNeededStatic(main_files): 228 def _GetNeededStatic(main_files):
229 needed = {} 229 needed = {}
230 for filename in main_files: 230 for filename in main_files:
231 arch = elf.ParseElfHeader(filename)[0] 231 arch = elf.ParseElfHeader(filename)[0]
232 needed[filename] = arch 232 needed[filename] = arch
233 return needed 233 return needed
OLDNEW
« no previous file with comments | « native_client_sdk/src/tools/create_nmf.py ('k') | native_client_sdk/src/tools/nacl_gcc.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698