rust targets: lld-link is the same as link for static libs
Without this, rustc will fail to find libfoo.a; same as with MSVC.
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 68c63b2..dba67fa 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -1694,9 +1694,9 @@
args += ['--extern', '{}={}'.format(d.name, os.path.join(d.subdir, d.filename))]
elif d.typename == 'static library':
# Rustc doesn't follow Meson's convention that static libraries
- # are called .a, and implementation libraries are .lib, so we
- # have to manually handle that.
- if rustc.linker.id == 'link':
+ # are called .a, and import libraries are .lib, so we have to
+ # manually handle that.
+ if rustc.linker.id in ('link', 'lld-link'):
args += ['-C', f'link-arg={self.get_target_filename_for_linking(d)}']
else:
args += ['-l', f'static={d.name}']