interpreter: Lower case languages before checking if 'c' is in the list

Fixes: #7495
pull/7618/head
Xavier Claessens 4 years ago committed by Nirbheek Chauhan
parent 1d0108e9c3
commit 835d28080c
  1. 2
      mesonbuild/interpreter.py
  2. 3
      test cases/vala/1 basic/meson.build

@ -3209,6 +3209,7 @@ external dependencies (including libraries) must go to "dependencies".''')
return should
def add_languages_for(self, args, required, for_machine: MachineChoice):
args = [a.lower() for a in args]
langs = set(self.coredata.compilers[for_machine].keys())
langs.update(args)
if 'vala' in langs:
@ -3217,7 +3218,6 @@ external dependencies (including libraries) must go to "dependencies".''')
success = True
for lang in sorted(args, key=compilers.sort_clink):
lang = lang.lower()
clist = self.coredata.compilers[for_machine]
machine_name = for_machine.get_lower_case_name()
if lang in clist:

@ -1,4 +1,5 @@
project('valatest', 'vala', 'c')
# Language are case unsensitive, check here that capital C works too.
project('valatest', 'vala', 'C')
valadeps = [dependency('glib-2.0'), dependency('gobject-2.0')]

Loading…
Cancel
Save