Skip to content

Commit

Permalink
Bug 938526 - Ignore import libraries when dealing with --extract in e…
Browse files Browse the repository at this point in the history
…xpandlibs_exec.py. r=khuey
  • Loading branch information
glandium committed Nov 19, 2013
1 parent 659e5ac commit 14ea599
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions config/expandlibs_exec.py
Expand Up @@ -84,8 +84,14 @@ def _extract(self, args):
self.tmp.append(tmp)
if conf.AR == 'lib':
out = subprocess.check_output([conf.AR, '-NOLOGO', '-LIST', arg])
for l in out.splitlines():
subprocess.call([conf.AR, '-NOLOGO', '-EXTRACT:%s' % l, os.path.abspath(arg)], cwd=tmp)
files = out.splitlines()
# If lib -list returns a list full of dlls, it's an
# import lib.
if all(isDynamicLib(f) for f in files):
newlist += [arg]
continue
for f in files:
subprocess.call([conf.AR, '-NOLOGO', '-EXTRACT:%s' % f, os.path.abspath(arg)], cwd=tmp)
else:
subprocess.call(ar_extract + [os.path.abspath(arg)], cwd=tmp)
objs = []
Expand Down
10 changes: 8 additions & 2 deletions js/src/config/expandlibs_exec.py
Expand Up @@ -84,8 +84,14 @@ def _extract(self, args):
self.tmp.append(tmp)
if conf.AR == 'lib':
out = subprocess.check_output([conf.AR, '-NOLOGO', '-LIST', arg])
for l in out.splitlines():
subprocess.call([conf.AR, '-NOLOGO', '-EXTRACT:%s' % l, os.path.abspath(arg)], cwd=tmp)
files = out.splitlines()
# If lib -list returns a list full of dlls, it's an
# import lib.
if all(isDynamicLib(f) for f in files):
newlist += [arg]
continue
for f in files:
subprocess.call([conf.AR, '-NOLOGO', '-EXTRACT:%s' % f, os.path.abspath(arg)], cwd=tmp)
else:
subprocess.call(ar_extract + [os.path.abspath(arg)], cwd=tmp)
objs = []
Expand Down

0 comments on commit 14ea599

Please sign in to comment.