aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/compilers/c.py4
-rw-r--r--mesonbuild/compilers/cpp.py4
-rw-r--r--mesonbuild/compilers/mixins/clike.py8
3 files changed, 6 insertions, 10 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 513a8e2..b1b4a7c 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -53,9 +53,7 @@ else:
class CCompiler(CLikeCompiler, Compiler):
-
- @staticmethod
- def attribute_check_func(name: str) -> str:
+ def attribute_check_func(self, name: str) -> str:
try:
return C_FUNC_ATTRIBUTES[name]
except KeyError:
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index 4c24767..253dc42 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -60,9 +60,7 @@ def non_msvc_eh_options(eh: str, args: T.List[str]) -> None:
'You may want to set eh to \'default\'.')
class CPPCompiler(CLikeCompiler, Compiler):
-
- @classmethod
- def attribute_check_func(cls, name: str) -> str:
+ def attribute_check_func(self, name: str) -> str:
try:
return CXX_FUNC_ATTRIBUTES.get(name, C_FUNC_ATTRIBUTES[name])
except KeyError:
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index 4c2756e..7f43fe2 100644
--- a/mesonbuild/compilers/mixins/clike.py
+++ b/mesonbuild/compilers/mixins/clike.py
@@ -187,8 +187,8 @@ class CLikeCompiler(Compiler):
def get_no_optimization_args(self) -> T.List[str]:
return ['-O0']
- def get_output_args(self, target: str) -> T.List[str]:
- return ['-o', target]
+ def get_output_args(self, outputname: str) -> T.List[str]:
+ return ['-o', outputname]
def get_werror_args(self) -> T.List[str]:
return ['-Werror']
@@ -270,8 +270,8 @@ class CLikeCompiler(Compiler):
def get_pch_use_args(self, pch_dir: str, header: str) -> T.List[str]:
return ['-include', os.path.basename(header)]
- def get_pch_name(self, header_name: str) -> str:
- return os.path.basename(header_name) + '.' + self.get_pch_suffix()
+ def get_pch_name(self, name: str) -> str:
+ return os.path.basename(name) + '.' + self.get_pch_suffix()
def get_default_include_dirs(self) -> T.List[str]:
return []