Fix two errors when cross-compiling with Vala

- AttributeError: 'ValaCompiler' object has no attribute 'get_program_dirs'

  Fixed by adding a `get_program_dirs()` function to the base Compiler
  class, to match `get_library_dirs()`

- KeyError: 'vala_COMPILER'

  Fixed by creating the Vala compile rules for all machines, not just
  the build machine.
pull/5572/head
James Westman 5 years ago committed by Jussi Pakkanen
parent 9149aaba9c
commit 77c3e6a4aa
  1. 3
      mesonbuild/backend/ninjabackend.py
  2. 3
      mesonbuild/compilers/compilers.py

@ -1653,8 +1653,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
self.generate_cs_compile_rule(compiler)
return
if langname == 'vala':
if self.environment.machines.matches_build_machine(compiler.for_machine):
self.generate_vala_compile_rules(compiler)
self.generate_vala_compile_rules(compiler)
return
if langname == 'rust':
self.generate_rust_compile_rules(compiler)

@ -1117,6 +1117,9 @@ class Compiler:
def get_library_dirs(self, *args, **kwargs):
return ()
def get_program_dirs(self, *args, **kwargs):
return ()
def has_multi_arguments(self, args, env) -> Tuple[bool, bool]:
raise EnvironmentException(
'Language {} does not support has_multi_arguments.'.format(

Loading…
Cancel
Save