diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-04-02 14:20:44 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-04-04 12:46:55 +0300 |
| commit | ff0c758b2a8015f7e7ca6fc627c29ef7bb4771b3 (patch) | |
| tree | 49de8a9f3a3d17d4f26a7c61e984027243834092 /mesonbuild/compilers/objcpp.py | |
| parent | 47984f813450bcbcd102ed45d579011deb4572c1 (diff) | |
| download | meson-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/objcpp.py')
| -rw-r--r-- | mesonbuild/compilers/objcpp.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |
