]> xenbits.xensource.com Git - people/aperard/qemu-dm.git/commitdiff
Fix objdump output parser in "nsis.py"
authorArthur Sengileyev <arthur.sengileyev@gmail.com>
Sat, 12 Apr 2025 18:08:30 +0000 (21:08 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 13 Apr 2025 10:45:41 +0000 (13:45 +0300)
In msys2 distribution objdump from gcc is using single tab character
prefix, but objdump from clang is using 4 white space characters instead.
The script will not identify any dll dependencies for a QEMU build
generated with clang. This in turn will fail the build, because there
will be no files inside dlldir and no setup file will be created.
Instead of checking for whitespace in prefix use lstrip to accommodate
for differences in outputs.

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
scripts/nsis.py

index af4e064819a76745dc16af41112908e3267087a5..8f469634eb752a5b65d9b0b969d07ce9b53aa172 100644 (file)
@@ -23,7 +23,7 @@ def find_deps(exe_or_dll, search_path, analyzed_deps):
     output = subprocess.check_output(["objdump", "-p", exe_or_dll], text=True)
     output = output.split("\n")
     for line in output:
-        if not line.startswith("\tDLL Name: "):
+        if not line.lstrip().startswith("DLL Name: "):
             continue
 
         dep = line.split("DLL Name: ")[1].strip()