Skip to content

Commit

Permalink
Fix traceback on AIX in shlib archiving code
Browse files Browse the repository at this point in the history
A compiler may not have a linker:
```
'NoneType' object has no attribute 'get_command_to_archive_shlib'
```
  • Loading branch information
KamathForAIX authored and eli-schwartz committed Oct 31, 2023
1 parent f4d19db commit cfec255
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mesonbuild/compilers/compilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,8 @@ def get_archive_name(self, filename: str) -> str:
return self.linker.get_archive_name(filename)

def get_command_to_archive_shlib(self) -> T.List[str]:
if not self.linker:
return []
return self.linker.get_command_to_archive_shlib()

def thread_flags(self, env: 'Environment') -> T.List[str]:
Expand Down

0 comments on commit cfec255

Please sign in to comment.