Skip to content

Commit

Permalink
fix: addressing reviews for -P integration
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhatha committed Apr 18, 2024
1 parent e4fbfb4 commit d6d78aa
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 @@ -64,11 +64,11 @@ def list_dependency_names(self):
return names

def _remove_weak_symbols(self, symbol_info):
return [line for line in symbol_info if not re.search(r'\s[Ww]\s', line)]
return [line for line in symbol_info if not line.endswith(" w")]

def _capture_symbols(self, remove_symbol_versions, symbol_info):
if remove_symbol_versions:
symbol_info = [line.split('@')[0] for line in symbol_info]
symbol_info = [line.split('@')[0].strip() for line in symbol_info]
return symbol_info

def list_symbols_for_dependency(self, dependency, remove_symbol_versions=False):
Expand All @@ -77,7 +77,8 @@ def list_symbols_for_dependency(self, dependency, remove_symbol_versions=False):
return []
result = _nm.run('-D', '-P', dependency, stdout=subprocess.PIPE)
lines = result.stdout.decode('utf-8').splitlines()
return self._capture_symbols(remove_symbol_versions, lines)
lines = self._capture_symbols(remove_symbol_versions, lines)
return self._remove_weak_symbols(lines)

def list_undefined_symbols_for_dependency(self, dependency,
remove_symbol_versions=False):
Expand Down

0 comments on commit d6d78aa

Please sign in to comment.