Meson 0.60 switched the format of uninstalled static libraries
to thin archives, that is, they contain only paths to object files,
not the files themselves. Files cannot be extracted in this case,
resulting in build errors:
ar: `x' cannot be used on thin archives.
Handle thin archives when invoking pmdinfogen by directly using the
files referenced in the archive, when they already exist, and extracting
them if not.
Bugzilla ID: 836
Fixes: e6e9730c70 ("buildtools: support object file extraction for Windows")
Cc: stable@dpdk.org
Reported-by: Michal Berger <michallinuxstuff@gmail.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
"llvm-ar xv lib.a" from LLVM 8 doesn't print extracted object file
names. The effect of "v" is not formally specified either.
Use "llvm-ar t" to get archive member names.
Reported-by: Xueming Zhang <xuemingx.zhang@intel.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Use current build directory as base for temporary directories,
so that all build files are isolated there.
Fixes: e6e9730c70 ("buildtools: support object file extraction for Windows")
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Python 3.5 subprocess.run() has no capture_output parameter.
Use subprocess.PIPE available in all versions.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
clang archiver tool is llvm-ar on Windows and ar on other platforms.
MinGW always uses ar. Replace shell script (Unix-only) that calls ar
with a Python script (OS-independent) that calls an appropriate archiver
tool selected at configuration time. Move the logic not to generate
empty sources into pmdinfogen.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>