summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/rust.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-11-13 11:35:30 -0800
committerDylan Baker <dylan@pnwbakers.com>2025-11-19 10:48:48 -0800
commit802a9f6b522a1f48f48ed1cd6a598eabe90e699a (patch)
tree31d1d7b98a9c4d568c1c360bde42d0ea5ea3c95a /mesonbuild/compilers/rust.py
parent68b959c2c7a2cfb88ebf2205f25bf77abe318cb9 (diff)
downloadmeson-802a9f6b522a1f48f48ed1cd6a598eabe90e699a.tar.gz
compilers: Remove Environment parameter from RustCompiler.lib_file_to_l_args
Diffstat (limited to 'mesonbuild/compilers/rust.py')
-rw-r--r--mesonbuild/compilers/rust.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py
index b214a218d..3eb20500e 100644
--- a/mesonbuild/compilers/rust.py
+++ b/mesonbuild/compilers/rust.py
@@ -240,7 +240,7 @@ class RustCompiler(Compiler):
# being linked. However, Meson uses "bundle", not "whole_archive".
return False
- def lib_file_to_l_arg(self, env: Environment, libname: str) -> T.Optional[str]:
+ def lib_file_to_l_arg(self, libname: str) -> T.Optional[str]:
"""Undo the effects of -l on the filename, returning the
argument that can be passed to -l, or None if the
library name is not supported."""
@@ -251,7 +251,7 @@ class RustCompiler(Compiler):
# On Windows, rustc's -lfoo searches either foo.lib or libfoo.a.
# Elsewhere, it searches both static and shared libraries and always with
# the "lib" prefix; for simplicity just skip .lib on non-Windows.
- if env.machines[self.for_machine].is_windows():
+ if self.info.is_windows():
if ext == '.lib':
return libname
if ext != '.a':