From ff0c758b2a8015f7e7ca6fc627c29ef7bb4771b3 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 2 Apr 2025 14:20:44 +0200 Subject: compilers: move -std options to get_option_std_args, special-casing CUDA Move building the -std option to the new get_option_std_args method, special casing CUDA to never include the option from the host compiler. This fixes again #8523, which was broken by the option refactoring (unsurprisingly, since the fix was ripped out unceremoniously without a replacement). Fixes: #14365 Signed-off-by: Paolo Bonzini --- mesonbuild/compilers/objcpp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/objcpp.py') diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py index b38fdb60d..b1cb605e3 100644 --- a/mesonbuild/compilers/objcpp.py +++ b/mesonbuild/compilers/objcpp.py @@ -81,7 +81,7 @@ class GnuObjCPPCompiler(GnuCPPStds, GnuCompiler, ObjCPPCompiler): self.supported_warn_args(gnu_common_warning_args) + self.supported_warn_args(gnu_objc_warning_args))} - def get_option_compile_args(self, target: 'BuildTarget', env: 'Environment', subproject: T.Optional[str] = None) -> T.List[str]: + def get_option_std_args(self, target: BuildTarget, env: Environment, subproject: T.Optional[str] = None) -> T.List[str]: args: T.List[str] = [] key = OptionKey('cpp_std', subproject=subproject, machine=self.for_machine) if target: @@ -110,7 +110,7 @@ class ClangObjCPPCompiler(ClangCPPStds, ClangCompiler, ObjCPPCompiler): '3': default_warn_args + ['-Wextra', '-Wpedantic'], 'everything': ['-Weverything']} - def get_option_compile_args(self, target: 'BuildTarget', env: 'Environment', subproject: T.Optional[str] = None) -> T.List[str]: + def get_option_std_args(self, target: BuildTarget, env: Environment, subproject: T.Optional[str] = None) -> T.List[str]: args = [] key = OptionKey('cpp_std', machine=self.for_machine) std = self.get_compileropt_value(key, env, target, subproject) -- cgit v1.2.3