aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-09-17 12:19:53 -0700
committerDylan Baker <dylan@pnwbakers.com>2020-09-24 12:14:13 -0700
commita0a8ef567e80092c6fb954a5b665b2121ab9d59b (patch)
treeb12c9fdc5362a39306ac15eaa6afae3db933709f /mesonbuild/compilers
parent1e93d2875e77e6465f985dfcdef6b355a19c7d7c (diff)
downloadmeson-a0a8ef567e80092c6fb954a5b665b2121ab9d59b.zip
meson-a0a8ef567e80092c6fb954a5b665b2121ab9d59b.tar.gz
meson-a0a8ef567e80092c6fb954a5b665b2121ab9d59b.tar.bz2
compilers/mixins/intel: Use the has_func_attribute_extra_args function
Instead of putting that extra argument in the base compiles() class
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/compilers.py3
-rw-r--r--mesonbuild/compilers/mixins/intel.py4
2 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 2f26002..fd2d081 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.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,
diff --git a/mesonbuild/compilers/mixins/intel.py b/mesonbuild/compilers/mixins/intel.py
index eb4b10d..7295e4e 100644
--- a/mesonbuild/compilers/mixins/intel.py
+++ b/mesonbuild/compilers/mixins/intel.py
@@ -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):