diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index cb3552d7f0c1..7b573e4e4d8a 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -2369,7 +2369,7 @@ def generate_dynamic_link_rules(self) -> None: options = self._rsp_options(compiler) self.add_rule(NinjaRule(rule, command, args, description, **options, extra=pool)) - if self.environment.machines[for_machine].is_aix(): + if self.environment.machines[for_machine].is_aix() and complist: rule = 'AIX_LINKER{}'.format(self.get_rule_suffix(for_machine)) description = 'Archiving AIX shared library' cmdlist = compiler.get_command_to_archive_shlib()