summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2025-02-24 13:45:49 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2025-02-25 19:46:34 +0200
commitf44689645ebfea6ec2a5cc27f5755c557019185a (patch)
tree08af6e64941a62b93e4a81be722e0491a610ff1c
parent8389be04fe427c66634de7da73aaf8e572baa785 (diff)
downloadmeson-f44689645ebfea6ec2a5cc27f5755c557019185a.tar.gz
Use override value when setting up Cython language.
Closes #14284.
-rw-r--r--mesonbuild/build.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 3bc7d9641..55e829fde 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -980,8 +980,14 @@ class BuildTarget(Target):
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 great, 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: