From f44689645ebfea6ec2a5cc27f5755c557019185a Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 24 Feb 2025 13:45:49 +0200 Subject: Use override value when setting up Cython language. Closes #14284. --- mesonbuild/build.py | 10 ++++++++-- 1 file 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: -- cgit v1.2.3