Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symbolextractor: detect DLL name with llvm-nm/nm #14190

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions mesonbuild/scripts/symbolextractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,17 @@ def _get_implib_dllname(impfilename: str) -> T.Tuple[T.List[str], str]:
if output:
return [output], None
all_stderr += e
# Next, try llvm-nm.exe provided by LLVM, then nm.exe provided by MinGW
for nm in ('llvm-nm', 'nm'):
output, e = call_tool_nowarn(get_tool(nm) + ['--extern-only', '--defined-only',
'--format=posix', impfilename])
if output:
e = 'dll not found with {!r}\n'.format(nm)
first = output.split('\n')[1]
if first.endswith(':'):
output = first[:-1]
return [output], None
all_stderr += e
return ([], all_stderr)

def _get_implib_exports(impfilename: str) -> T.Tuple[T.List[str], str]:
Expand Down
Loading