Skip to content

Commit b0b5af6

Browse files
arixmkiiMichael Tokarev
authored andcommitted
Fix objdump output parser in "nsis.py"
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 <[email protected]> Reviewed-by: Stefan Weil <[email protected]> Reviewed-by: Michael Tokarev <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
1 parent 22e6d70 commit b0b5af6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/nsis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def find_deps(exe_or_dll, search_path, analyzed_deps):
2323
output = subprocess.check_output(["objdump", "-p", exe_or_dll], text=True)
2424
output = output.split("\n")
2525
for line in output:
26-
if not line.startswith("\tDLL Name: "):
26+
if not line.lstrip().startswith("DLL Name: "):
2727
continue
2828

2929
dep = line.split("DLL Name: ")[1].strip()

0 commit comments

Comments
 (0)