Skip to content

Commit

Permalink
compilers/objcpp: Use the GnuCPPStdMixin for ObjC++
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbaker committed Sep 6, 2024
1 parent 42c0747 commit f8d86c3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions mesonbuild/compilers/objcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from .mixins.clike import CLikeCompiler
from .compilers import Compiler
from .mixins.gnu import GnuCompiler, gnu_common_warning_args, gnu_objc_warning_args
from .mixins.gnu import GnuCompiler, GnuCPPStds, gnu_common_warning_args, gnu_objc_warning_args
from .mixins.clang import ClangCompiler, ClangCPPStds

if T.TYPE_CHECKING:
Expand Down Expand Up @@ -58,7 +58,7 @@ def get_options(self) -> coredata.MutableKeyedOptionDictType:
return opts


class GnuObjCPPCompiler(GnuCompiler, ObjCPPCompiler):
class GnuObjCPPCompiler(GnuCPPStds, GnuCompiler, ObjCPPCompiler):

Check warning

Code scanning / CodeQL

Conflicting attributes in base classes Warning

Base classes have conflicting values for attribute 'get_include_args':
Function get_include_args
and
Function get_include_args
.
Base classes have conflicting values for attribute 'openmp_flags':
Function openmp_flags
and
Function openmp_flags
.
Base classes have conflicting values for attribute 'get_prelink_args':
Function get_prelink_args
and
Function get_prelink_args
.
Base classes have conflicting values for attribute 'get_pic_args':
Function get_pic_args
and
Function get_pic_args
.
Base classes have conflicting values for attribute 'get_dependency_gen_args':
Function get_dependency_gen_args
and
Function get_dependency_gen_args
.
Base classes have conflicting values for attribute 'get_pch_suffix':
Function get_pch_suffix
and
Function get_pch_suffix
.
Base classes have conflicting values for attribute 'get_coverage_args':
Function get_coverage_args
and
Function get_coverage_args
.
Base classes have conflicting values for attribute 'get_debug_args':
Function get_debug_args
and
Function get_debug_args
.
Base classes have conflicting values for attribute 'compute_parameters_with_absolute_paths':
Function compute_parameters_with_absolute_paths
and
Function compute_parameters_with_absolute_paths
.
Base classes have conflicting values for attribute 'get_colorout_args':
Function get_colorout_args
and
Function get_colorout_args
.
Base classes have conflicting values for attribute 'get_output_args':
Function get_output_args
and
Function get_output_args
.
Base classes have conflicting values for attribute 'get_compile_only_args':
Function get_compile_only_args
and
Function get_compile_only_args
.
Base classes have conflicting values for attribute 'get_argument_syntax':
staticmethod()
and
staticmethod()
.
Base classes have conflicting values for attribute 'get_instruction_set_args':
Function get_instruction_set_args
and
Function get_instruction_set_args
.
Base classes have conflicting values for attribute 'has_builtin_define':
Function has_builtin_define
and
Function has_builtin_define
.
Base classes have conflicting values for attribute 'get_builtin_define':
Function get_builtin_define
and
Function get_builtin_define
.
Base classes have conflicting values for attribute 'use_linker_args':
classmethod()
and
classmethod()
.
Base classes have conflicting values for attribute 'get_has_func_attribute_extra_args':
Function get_has_func_attribute_extra_args
and
Function get_has_func_attribute_extra_args
.
Base classes have conflicting values for attribute 'get_compiler_dirs':
Function get_compiler_dirs
and
Function get_compiler_dirs
.
Base classes have conflicting values for attribute 'get_default_include_dirs':
Function get_default_include_dirs
and
Function get_default_include_dirs
.
Base classes have conflicting values for attribute 'has_arguments':
Function has_arguments
and
Function has_arguments
.
Base classes have conflicting values for attribute 'gnu_symbol_visibility_args':
Function gnu_symbol_visibility_args
and
Function gnu_symbol_visibility_args
.
Base classes have conflicting values for attribute 'get_pie_args':
Function get_pie_args
and
Function get_pie_args
.
Base classes have conflicting values for attribute 'get_profile_generate_args':
Function get_profile_generate_args
and
Function get_profile_generate_args
.
Base classes have conflicting values for attribute 'sanitizer_compile_args':
Function sanitizer_compile_args
and
Function sanitizer_compile_args
.
Base classes have conflicting values for attribute 'get_preprocess_to_file_args':
Function get_preprocess_to_file_args
and
Function get_preprocess_to_file_args
.
Base classes have conflicting values for attribute 'split_shlib_to_parts':
Function split_shlib_to_parts
and
Function split_shlib_to_parts
.
def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice,
is_cross: bool, info: 'MachineInfo',
defines: T.Optional[T.Dict[str, str]] = None,
Expand All @@ -76,6 +76,13 @@ def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_
self.supported_warn_args(gnu_common_warning_args) +
self.supported_warn_args(gnu_objc_warning_args))}

def get_option_compile_args(self, options: 'coredata.KeyedOptionDictType') -> T.List[str]:
args = []
std = options.get_value(self.form_compileropt_key('std'))
if std != 'none':
args.append('-std=' + std)
return args


class ClangObjCPPCompiler(ClangCPPStds, ClangCompiler, ObjCPPCompiler):

Check warning

Code scanning / CodeQL

Conflicting attributes in base classes Warning

Base classes have conflicting values for attribute 'get_include_args':
Function get_include_args
and
Function get_include_args
.
Base classes have conflicting values for attribute 'openmp_flags':
Function openmp_flags
and
Function openmp_flags
.
Base classes have conflicting values for attribute 'get_pic_args':
Function get_pic_args
and
Function get_pic_args
.
Base classes have conflicting values for attribute 'get_dependency_gen_args':
Function get_dependency_gen_args
and
Function get_dependency_gen_args
.
Base classes have conflicting values for attribute 'get_pch_use_args':
Function get_pch_use_args
and
Function get_pch_use_args
.
Base classes have conflicting values for attribute 'get_pch_suffix':
Function get_pch_suffix
and
Function get_pch_suffix
.
Base classes have conflicting values for attribute 'get_coverage_args':
Function get_coverage_args
and
Function get_coverage_args
.
Base classes have conflicting values for attribute 'get_debug_args':
Function get_debug_args
and
Function get_debug_args
.
Base classes have conflicting values for attribute 'compute_parameters_with_absolute_paths':
Function compute_parameters_with_absolute_paths
and
Function compute_parameters_with_absolute_paths
.
Base classes have conflicting values for attribute 'get_colorout_args':
Function get_colorout_args
and
Function get_colorout_args
.
Base classes have conflicting values for attribute 'get_output_args':
Function get_output_args
and
Function get_output_args
.
Base classes have conflicting values for attribute 'get_compile_only_args':
Function get_compile_only_args
and
Function get_compile_only_args
.
Base classes have conflicting values for attribute 'get_argument_syntax':
staticmethod()
and
staticmethod()
.
Base classes have conflicting values for attribute 'get_instruction_set_args':
Function get_instruction_set_args
and
Function get_instruction_set_args
.
Base classes have conflicting values for attribute 'has_builtin_define':
Function has_builtin_define
and
Function has_builtin_define
.
Base classes have conflicting values for attribute 'get_builtin_define':
Function get_builtin_define
and
Function get_builtin_define
.
Base classes have conflicting values for attribute 'use_linker_args':
classmethod()
and
classmethod()
.
Base classes have conflicting values for attribute 'get_has_func_attribute_extra_args':
Function get_has_func_attribute_extra_args
and
Function get_has_func_attribute_extra_args
.
Base classes have conflicting values for attribute 'get_coverage_link_args':
Function get_coverage_link_args
and
Function get_coverage_link_args
.
Base classes have conflicting values for attribute 'linker_to_compiler_args':
Function linker_to_compiler_args
and
Function linker_to_compiler_args
.
Base classes have conflicting values for attribute 'get_lto_link_args':
Function get_lto_link_args
and
Function get_lto_link_args
.
Base classes have conflicting values for attribute 'get_compiler_dirs':
Function get_compiler_dirs
and
Function get_compiler_dirs
.
Base classes have conflicting values for attribute 'get_default_include_dirs':
Function get_default_include_dirs
and
Function get_default_include_dirs
.
Base classes have conflicting values for attribute 'gnu_symbol_visibility_args':
Function gnu_symbol_visibility_args
and
Function gnu_symbol_visibility_args
.
Base classes have conflicting values for attribute 'get_pie_args':
Function get_pie_args
and
Function get_pie_args
.
Base classes have conflicting values for attribute 'get_profile_generate_args':
Function get_profile_generate_args
and
Function get_profile_generate_args
.
Base classes have conflicting values for attribute 'get_profile_use_args':
Function get_profile_use_args
and
Function get_profile_use_args
.
Base classes have conflicting values for attribute 'sanitizer_compile_args': [Function

Expand Down

0 comments on commit f8d86c3

Please sign in to comment.