aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index c5cac32..a266e1f 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -3050,7 +3050,7 @@ external dependencies (including libraries) must go to "dependencies".''')
mlog.log()
return result
- def get_option_internal(self, optname):
+ def get_option_internal(self, optname: str):
raw_optname = optname
if self.is_subproject():
optname = self.subproject + ':' + optname
@@ -3069,9 +3069,10 @@ external dependencies (including libraries) must go to "dependencies".''')
return v
try:
- opt = self.coredata.user_options[optname]
- if opt.yielding and ':' in optname and raw_optname in self.coredata.user_options:
- popt = self.coredata.user_options[raw_optname]
+ key = coredata.OptionKey.from_string(optname)
+ opt = self.coredata.user_options[key]
+ if opt.yielding and key.subproject and key.as_root() in self.coredata.user_options:
+ popt = self.coredata.user_options[key.as_root()]
if type(opt) is type(popt):
opt = popt
else: