compilers/mixins/intel: Use the has_func_attribute_extra_args function

Instead of putting that extra argument in the base compiles() class
pull/7786/head
Dylan Baker 4 years ago
parent 1e93d2875e
commit a0a8ef567e
  1. 3
      mesonbuild/compilers/compilers.py
  2. 4
      mesonbuild/compilers/mixins/intel.py

@ -1041,6 +1041,9 @@ class Compiler(metaclass=abc.ABCMeta):
def get_pch_use_args(self, pch_dir: str, header: str) -> T.List[str]:
raise EnvironmentException('{} does not support pre compiled headers'.format(self.id))
def get_has_func_attribute_extra_args(self, name: str) -> T.List[str]:
raise EnvironmentException('{} does not support function attributes'.format(self.id))
def get_args_from_envvars(lang: str,
for_machine: MachineChoice,

@ -109,7 +109,6 @@ class IntelGnuLikeCompiler(GnuLikeCompiler):
'-diag-error', '10156', # ignoring not argument allowed
'-diag-error', '10157', # Ignoring argument of the wrong type
'-diag-error', '10158', # Argument must be separate. Can be hit by trying an option like -foo-bar=foo when -foo=bar is a valid option but -foo-bar isn't
'-diag-error', '1292', # unknown __attribute__
]
return super().compiles(*args, **kwargs)
@ -125,6 +124,9 @@ class IntelGnuLikeCompiler(GnuLikeCompiler):
def get_optimization_args(self, optimization_level: str) -> T.List[str]:
return self.OPTIM_ARGS[optimization_level]
def get_has_func_attribute_extra_args(self, name: str) -> T.List[str]:
return ['-diag-error', '1292']
class IntelVisualStudioLikeCompiler(VisualStudioLikeCompiler):

Loading…
Cancel
Save