summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/objcpp.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-03-04 08:24:08 -0800
committerEli Schwartz <eschwartz93@gmail.com>2025-03-10 14:14:25 -0400
commit251f74dcf3fea706ed373b717257f82592b6a1de (patch)
tree5ee2906048dc2bb552be08e040d332e9dfc7d8fb /mesonbuild/compilers/objcpp.py
parent4fa52925459dac650bf053715987ee7beb3b23c1 (diff)
downloadmeson-251f74dcf3fea706ed373b717257f82592b6a1de.tar.gz
coredata: remove get_option_for_subproject
This is just a wrapper around `OptionStore.get_option_for`, but without taking an `OptionKey`. This complicates the subproject passing, since `OptionKey` is designed to encapsulate the option name and subproject.
Diffstat (limited to 'mesonbuild/compilers/objcpp.py')
-rw-r--r--mesonbuild/compilers/objcpp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py
index 743bbb9cd..b38fdb60d 100644
--- a/mesonbuild/compilers/objcpp.py
+++ b/mesonbuild/compilers/objcpp.py
@@ -83,11 +83,11 @@ class GnuObjCPPCompiler(GnuCPPStds, GnuCompiler, ObjCPPCompiler):
def get_option_compile_args(self, target: 'BuildTarget', env: 'Environment', subproject: T.Optional[str] = None) -> T.List[str]:
args: T.List[str] = []
- key = OptionKey('cpp_std', machine=self.for_machine)
+ key = OptionKey('cpp_std', subproject=subproject, machine=self.for_machine)
if target:
std = env.coredata.get_option_for_target(target, key)
else:
- std = env.coredata.get_option_for_subproject(key, subproject)
+ std = env.coredata.optstore.get_value_for(key)
assert isinstance(std, str)
if std != 'none':
args.append('-std=' + std)