Implement add_languages(native:) in introspector
@@ -138,6 +138,11 @@ class IntrospectionInterpreter(AstInterpreter):
return
def func_add_languages(self, node: BaseNode, args: T.List[TYPE_nvar], kwargs: T.Dict[str, TYPE_nvar]) -> None:
+ kwargs = self.flatten_kwargs(kwargs)
+ if 'native' in kwargs:
+ native = kwargs.get('native', False)
+ self._add_languages(args, MachineChoice.BUILD if native else MachineChoice.HOST)
+ else:
for for_machine in [MachineChoice.BUILD, MachineChoice.HOST]:
self._add_languages(args, for_machine)
