mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1471293 - Support using llvm-objdump in dependentlibs.py r=glandium
MozReview-Commit-ID: 8b0o06EQh3n --HG-- extra : rebase_source : e5a3296723d6a64db38427d4b30fb820d0516abd
This commit is contained in:
parent
4e1a98da16
commit
29adb6362f
@ -41,10 +41,14 @@ def dependentlibs_dumpbin(lib):
|
||||
return deps
|
||||
|
||||
def dependentlibs_mingw_objdump(lib):
|
||||
proc = subprocess.Popen(['objdump', '-x', lib], stdout = subprocess.PIPE)
|
||||
try:
|
||||
proc = subprocess.Popen(['objdump', '-x', lib], stdout = subprocess.PIPE)
|
||||
except OSError:
|
||||
# objdump is missing, try using llvm-objdump.
|
||||
proc = subprocess.Popen(['llvm-objdump', '-private-headers', lib], stdout = subprocess.PIPE)
|
||||
deps = []
|
||||
for line in proc.stdout:
|
||||
match = re.match('\tDLL Name: (\S+)', line)
|
||||
match = re.match('\s+DLL Name: (\S+)', line)
|
||||
if match:
|
||||
deps.append(match.group(1))
|
||||
proc.wait()
|
||||
|
Loading…
Reference in New Issue
Block a user