Skip to content

Commit

Permalink
fix: test commit for nm format
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhatha committed Mar 14, 2024
1 parent 5ee2e75 commit 803932a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dev/archery/archery/linking.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ def list_dependency_names(self):
return names

def list_symbols_for_dependency(self, dependency):
result = _nm.run('--format=just-symbols', '-D',
result = _nm.run('--format=bsd', '-D',
dependency, stdout=subprocess.PIPE)
lines = result.stdout.decode('utf-8').splitlines()
return lines

def list_undefined_symbols_for_dependency(self, dependency):
result = _nm.run('--format=just-symbols', '-u',
result = _nm.run('--format=bsd', '-u',
dependency, stdout=subprocess.PIPE)
lines = result.stdout.decode('utf-8').splitlines()
return lines
Expand Down Expand Up @@ -103,13 +103,14 @@ def check_dynamic_library_dependencies(path, allowed, disallowed):
)
# Check for undefined symbols
undefined_symbols = dylib.list_undefined_symbols_for_dependency(path)
print(len(undefined_symbols))
expected_lib_paths = dylib.find_library_paths(allowed)
for lb_path in expected_lib_paths.values():
expected_symbols = dylib.list_symbols_for_dependency(lb_path)
for exp_sym in expected_symbols:
if exp_sym in undefined_symbols:
undefined_symbols.remove(exp_sym)

print(len(undefined_symbols))
if undefined_symbols:
undefined_symbols_str = '\n'.join(undefined_symbols)
raise DependencyError(
Expand Down

0 comments on commit 803932a

Please sign in to comment.