summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/backends.py2
-rw-r--r--mesonbuild/compilers/compilers.py2
-rw-r--r--mesonbuild/compilers/mixins/clike.py8
-rw-r--r--mesonbuild/compilers/mixins/elbrus.py2
4 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 6ebdbc829..446e15e8a 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -1063,7 +1063,7 @@ class Backend:
# Get program and library dirs from all target compilers
if isinstance(target, build.BuildTarget):
for cc in target.compilers.values():
- paths.update(cc.get_program_dirs(self.environment))
+ paths.update(cc.get_program_dirs())
paths.update(cc.get_library_dirs())
return list(paths)
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index e1086eb73..d5250f0e5 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -776,7 +776,7 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta):
'Language {} does not support get_library_naming.'.format(
self.get_display_language()))
- def get_program_dirs(self, env: 'Environment') -> T.List[str]:
+ def get_program_dirs(self) -> T.List[str]:
return []
def has_multi_arguments(self, args: T.List[str]) -> T.Tuple[bool, bool]:
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index db4d385c6..de4230178 100644
--- a/mesonbuild/compilers/mixins/clike.py
+++ b/mesonbuild/compilers/mixins/clike.py
@@ -238,15 +238,15 @@ class CLikeCompiler(Compiler):
return self._get_library_dirs(elf_class).copy()
@functools.lru_cache()
- def _get_program_dirs(self, env: 'Environment') -> 'ImmutableListProtocol[str]':
+ def _get_program_dirs(self) -> 'ImmutableListProtocol[str]':
'''
Programs used by the compiler. Also where toolchain DLLs such as
libstdc++-6.dll are found with MinGW.
'''
- return self.get_compiler_dirs(env, 'programs')
+ return self.get_compiler_dirs(self.environment, 'programs')
- def get_program_dirs(self, env: 'Environment') -> T.List[str]:
- return self._get_program_dirs(env).copy()
+ def get_program_dirs(self) -> T.List[str]:
+ return self._get_program_dirs().copy()
def get_pic_args(self) -> T.List[str]:
return ['-fPIC']
diff --git a/mesonbuild/compilers/mixins/elbrus.py b/mesonbuild/compilers/mixins/elbrus.py
index 800f20a97..e4e2cc71a 100644
--- a/mesonbuild/compilers/mixins/elbrus.py
+++ b/mesonbuild/compilers/mixins/elbrus.py
@@ -50,7 +50,7 @@ class ElbrusCompiler(GnuLikeCompiler):
return [os.path.realpath(p) for p in libstr.split(':') if os.path.exists(p)]
return []
- def get_program_dirs(self, env: 'Environment') -> T.List[str]:
+ def get_program_dirs(self) -> T.List[str]:
os_env = os.environ.copy()
os_env['LC_ALL'] = 'C'
stdo = Popen_safe(self.get_exelist(ccache=False) + ['--print-search-dirs'], env=os_env)[1]