Use override value when setting up Cython language.
Closes #14284.
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 3bc7d96..0c1e7e6 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -980,8 +980,14 @@
if 'vala' in self.compilers and 'c' not in self.compilers:
self.compilers['c'] = self.all_compilers['c']
if 'cython' in self.compilers:
- key = OptionKey('cython_language', machine=self.for_machine)
- value = self.environment.coredata.optstore.get_value_for(key)
+ # Not grea, but we can't ask for the override value from "the system"
+ # because this object is currently being constructed so it is not
+ # yet placed in the data store. Grab it directly from override strings
+ # instead.
+ value = self.get_override('cython_language')
+ if value is None:
+ key = OptionKey('cython_language', machine=self.for_machine)
+ value = self.environment.coredata.optstore.get_value_for(key)
try:
self.compilers[value] = self.all_compilers[value]
except KeyError: