On Tue, Apr 15, 2025 at 10:44:51AM +0300, Dmitry Kozlyuk wrote: > On 15.04.2025 04:21, Andre Muezerie wrote: > >-_, tmp_root, ar, archive, output, *pmdinfogen = sys.argv > >+_, tmp_root, archiver, archive, output, *pmdinfogen = sys.argv > > with tempfile.TemporaryDirectory(dir=tmp_root) as temp: > > paths = [] > >- for name in subprocess.run([ar, "t", archive], stdout=subprocess.PIPE, > >+ if archiver == 'lib': > >+ archiver_options = ['/LIST', '/NOLOGO'] > >+ else: > >+ archiver_options = ['t'] > >+ for name in subprocess.run([archiver] + archiver_options + [archive], > >stdout=subprocess.PIPE, > > check=True).stdout.decode().splitlines(): > > if os.path.exists(name): > > paths.append(name) > > else: > >- subprocess.run([ar, "x", os.path.abspath(archive), name], > >+ subprocess.run([archiver, "x", os.path.abspath(archive), name], > > check=True, cwd=temp) > > paths.append(os.path.join(temp, name)) > > subprocess.run(pmdinfogen + paths + [output], check=True) > Does `lib.exe` support `x`? Can't find this option in the doc: > https://learn.microsoft.com/en-us/cpp/build/reference/running-lib?view=msvc-170
It does not. I'll update this in the next series.