diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index fb399b11422f..a7bb6c417932 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -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]: