Skip to content

Commit c51cfcb

Browse files
KamathForAIXrgommers
authored andcommitted
Fix traceback on AIX in shlib archiving code
A compiler may not have a linker: ``` 'NoneType' object has no attribute 'get_command_to_archive_shlib' ``` (cherry picked from commit cfec255)
1 parent bc8a7e1 commit c51cfcb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mesonbuild/compilers/compilers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,8 @@ def get_archive_name(self, filename: str) -> str:
960960
return self.linker.get_archive_name(filename)
961961

962962
def get_command_to_archive_shlib(self) -> T.List[str]:
963+
if not self.linker:
964+
return []
963965
return self.linker.get_command_to_archive_shlib()
964966

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

0 commit comments

Comments
 (0)