summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/rust.py
diff options
context:
space:
mode:
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':