diff mbox series

[2/2] oe/package.py: enhance objdump command call with llvm

Message ID 20240330064111.2531269-3-lxy204899@163.com
State New
Headers show
Series *** SUBJECT HERE *** | expand

Commit Message

lixiaoyong March 30, 2024, 6:41 a.m. UTC
From: lixiaoyong <lixiaoyong19@huawei.com>

Replace `${HOST_PREFIX}objdump` with `${OBJDUMP}`.

When utilizing llvm for compiling packages, the invocation of GNU objdump
will consistently occur during package precess. This behavior is unfriendly
to llvm. So prefer `${OBJDUMP}` over `${HOST_PREFIX}objdump`.

Signed-off-by: lixiaoyong <lixiaoyong19@huawei.com>
---
 meta/lib/oe/package.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 587810bd..1511ba47 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -1660,7 +1660,7 @@  def process_shlibs(pkgfiles, d):
 
         if (file.endswith(".dll") or file.endswith(".exe")):
             # use objdump to search for "DLL Name: .*\.dll"
-            p = subprocess.Popen([d.expand("${HOST_PREFIX}objdump"), "-p", file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+            p = subprocess.Popen([d.expand("${OBJDUMP}"), "-p", file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
             out, err = p.communicate()
             # process the output, grabbing all .dll names
             if p.returncode == 0: