* [dpdk-dev] [PATCH] buildtools: fix archive extraction for LLVM 8
@ 2021-01-28 19:05 Dmitry Kozlyuk
2021-01-28 22:02 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Kozlyuk @ 2021-01-28 19:05 UTC (permalink / raw)
To: dev; +Cc: Dmitry Kozlyuk, XuemingX Zhang, Neil Horman
"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: XuemingX Zhang <xuemingx.zhang@intel.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
buildtools/gen-pmdinfo-cfile.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/buildtools/gen-pmdinfo-cfile.py b/buildtools/gen-pmdinfo-cfile.py
index a4e080199..58fe3ad15 100644
--- a/buildtools/gen-pmdinfo-cfile.py
+++ b/buildtools/gen-pmdinfo-cfile.py
@@ -9,11 +9,12 @@
_, tmp_root, ar, archive, output, *pmdinfogen = sys.argv
with tempfile.TemporaryDirectory(dir=tmp_root) as temp:
- proc = subprocess.run(
- # Don't use "ar p", because its output is corrupted on Windows.
- [ar, "xv", os.path.abspath(archive)], stdout=subprocess.PIPE, check=True, cwd=temp
+ run_ar = lambda command: subprocess.run(
+ [ar, command, os.path.abspath(archive)],
+ stdout=subprocess.PIPE, check=True, cwd=temp
)
- lines = proc.stdout.decode().splitlines()
- names = [line[len("x - ") :] for line in lines]
+ # Don't use "ar p", because its output is corrupted on Windows.
+ run_ar("x")
+ names = run_ar("t").stdout.decode().splitlines()
paths = [os.path.join(temp, name) for name in names]
subprocess.run(pmdinfogen + paths + [output], check=True)
--
2.29.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] buildtools: fix archive extraction for LLVM 8
2021-01-28 19:05 [dpdk-dev] [PATCH] buildtools: fix archive extraction for LLVM 8 Dmitry Kozlyuk
@ 2021-01-28 22:02 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2021-01-28 22:02 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: dev, XuemingX Zhang
28/01/2021 20:05, Dmitry Kozlyuk:
> "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: XuemingX Zhang <xuemingx.zhang@intel.com>
>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-28 22:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 19:05 [dpdk-dev] [PATCH] buildtools: fix archive extraction for LLVM 8 Dmitry Kozlyuk
2021-01-28 22:02 ` Thomas Monjalon
DPDK patches and discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
dev@dpdk.org
public-inbox-index dev
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.dpdk.org/inbox.dpdk.dev
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git