diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-11-12 14:18:34 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-11-19 10:48:48 -0800 |
| commit | a66a14770bcbd98f1510ab7d669183e4b9d2f46d (patch) | |
| tree | aac6bc933188e66cb4d4a482b5ce7d8e8a9fa396 /mesonbuild/compilers | |
| parent | 6e081df405cfba85130ccd239f10ad769db8a34a (diff) | |
| download | meson-a66a14770bcbd98f1510ab7d669183e4b9d2f46d.tar.gz | |
compilers: Remove Environment parameter from Compiler.get_program_dirs
Diffstat (limited to 'mesonbuild/compilers')
| -rw-r--r-- | mesonbuild/compilers/compilers.py | 2 | ||||
| -rw-r--r-- | mesonbuild/compilers/mixins/clike.py | 8 | ||||
| -rw-r--r-- | mesonbuild/compilers/mixins/elbrus.py | 2 |
3 files changed, 6 insertions, 6 deletions
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] |
