diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-01-30 09:02:40 -0800 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-02-05 17:45:38 +0200 |
| commit | f0a6ba380989c68ecc5af61087157557b329f808 (patch) | |
| tree | 108b9d8bb91e1f14d6aa2b8c853626b5b7cd7e82 /mesonbuild/compilers/cpp.py | |
| parent | b51840cf18198865e9b91f5b249e7e2e9526a604 (diff) | |
| download | meson-f0a6ba380989c68ecc5af61087157557b329f808.tar.gz | |
compilers: use super().get_options() instead of CompilerClass.get_options()
Because the latter doesn't always interact with the MRO correctly.
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
| -rw-r--r-- | mesonbuild/compilers/cpp.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index fcc5ddef2..fd0573ce9 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -390,7 +390,7 @@ class ArmclangCPPCompiler(ArmclangCompiler, CPPCompiler): 'everything': ['-Weverything']} def get_options(self) -> 'MutableKeyedOptionDictType': - opts = CPPCompiler.get_options(self) + opts = super().get_options() key = self.form_compileropt_key('std') self.update_options( opts, @@ -545,7 +545,7 @@ class NvidiaHPC_CPPCompiler(PGICompiler, CPPCompiler): PGICompiler.__init__(self) def get_options(self) -> 'MutableKeyedOptionDictType': - opts = CPPCompiler.get_options(self) + opts = super().get_options() cppstd_choices = [ 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++20', 'c++23', 'gnu++98', 'gnu++03', 'gnu++11', 'gnu++14', 'gnu++17', 'gnu++20' @@ -567,7 +567,7 @@ class ElbrusCPPCompiler(ElbrusCompiler, CPPCompiler): ElbrusCompiler.__init__(self) def get_options(self) -> 'MutableKeyedOptionDictType': - opts = CPPCompiler.get_options(self) + opts = super().get_options() cpp_stds = ['c++98'] if version_compare(self.version, '>=1.20.00'): @@ -649,7 +649,7 @@ class IntelCPPCompiler(IntelGnuLikeCompiler, CPPCompiler): 'everything': default_warn_args + ['-Wextra']} def get_options(self) -> 'MutableKeyedOptionDictType': - opts = CPPCompiler.get_options(self) + opts = super().get_options() # Every Unix compiler under the sun seems to accept -std=c++03, # with the exception of ICC. Instead of preventing the user from # globally requesting C++03, we transparently remap it to C++98 @@ -923,7 +923,7 @@ class ArmCPPCompiler(ArmCompiler, CPPCompiler): ArmCompiler.__init__(self) def get_options(self) -> 'MutableKeyedOptionDictType': - opts = CPPCompiler.get_options(self) + opts = super().get_options() std_opt = self.form_compileropt_key('std') assert isinstance(std_opt, options.UserStdOption), 'for mypy' std_opt.set_versions(['c++03', 'c++11']) @@ -984,7 +984,7 @@ class TICPPCompiler(TICompiler, CPPCompiler): TICompiler.__init__(self) def get_options(self) -> 'MutableKeyedOptionDictType': - opts = CPPCompiler.get_options(self) + opts = super().get_options() key = self.form_compileropt_key('std') std_opt = opts[key] assert isinstance(std_opt, options.UserStdOption), 'for mypy' @@ -1027,7 +1027,7 @@ class MetrowerksCPPCompilerARM(MetrowerksCompiler, CPPCompiler): return mwccarm_instruction_set_args.get(instruction_set, None) def get_options(self) -> 'MutableKeyedOptionDictType': - opts = CPPCompiler.get_options(self) + opts = super().get_options() key = self.form_compileropt_key('std') opts[key].choices = ['none'] return opts @@ -1056,7 +1056,7 @@ class MetrowerksCPPCompilerEmbeddedPowerPC(MetrowerksCompiler, CPPCompiler): return mwcceppc_instruction_set_args.get(instruction_set, None) def get_options(self) -> 'MutableKeyedOptionDictType': - opts = CPPCompiler.get_options(self) + opts = super().get_options() key = self.form_compileropt_key('std') opts[key].choices = ['none'] return opts |
