From bc56a2c3469def7fafbdb38da6691cccb171e739 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 21 Jul 2024 03:52:07 -0400 Subject: compilers: fix partial refactor of coredata options Fallout from the OptionStore refactor, and specifically commit 9a6fcd4d9a0c7bb248c5d0587632b741a3301e03. The `std` object was migrated from having an option itself, to having the value fetched and saved directly. In most cases, this also meant avoiding `.value`, but in a couple cases this refactor went overlooked, and crashed at runtime. Only affects Elbrus and Intel C++ compilers, seemingly. Fixes #13401 --- mesonbuild/compilers/cpp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 1f0952455..f9ebf08da 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -622,8 +622,8 @@ class ElbrusCPPCompiler(ElbrusCompiler, CPPCompiler): args: T.List[str] = [] key = self.form_compileropt_key('std') std = options.get_value(key) - if std.value != 'none': - args.append(self._find_best_cpp_std(std.value)) + if std != 'none': + args.append(self._find_best_cpp_std(std)) key = self.form_compileropt_key('eh') non_msvc_eh_options(options.get_value(key), args) @@ -699,7 +699,7 @@ class IntelCPPCompiler(IntelGnuLikeCompiler, CPPCompiler): 'c++03': 'c++98', 'gnu++03': 'gnu++98' } - args.append('-std=' + remap_cpp03.get(std.value, std)) + args.append('-std=' + remap_cpp03.get(std, std)) if options.get_value(key.evolve('eh')) == 'none': args.append('-fno-exceptions') if not options.get_value(key.evolve('rtti')): -- cgit v1.2.3