summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/objc.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-04-02 14:20:44 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2025-04-04 12:46:55 +0300
commitff0c758b2a8015f7e7ca6fc627c29ef7bb4771b3 (patch)
tree49de8a9f3a3d17d4f26a7c61e984027243834092 /mesonbuild/compilers/objc.py
parent47984f813450bcbcd102ed45d579011deb4572c1 (diff)
downloadmeson-ff0c758b2a8015f7e7ca6fc627c29ef7bb4771b3.tar.gz
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 <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/compilers/objc.py')
-rw-r--r--mesonbuild/compilers/objc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/objc.py b/mesonbuild/compilers/objc.py
index 776f5037d..c36373f43 100644
--- a/mesonbuild/compilers/objc.py
+++ b/mesonbuild/compilers/objc.py
@@ -76,7 +76,7 @@ class GnuObjCCompiler(GnuCStds, GnuCompiler, ObjCCompiler):
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('c_std', subproject=subproject, machine=self.for_machine)
if target:
@@ -114,7 +114,7 @@ class ClangObjCCompiler(ClangCStds, ClangCompiler, ObjCCompiler):
return 'c_std'
return super().make_option_name(key)
- 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('c_std', machine=self.for_machine)
std = self.get_compileropt_value(key, env, target, subproject)