From 1c00cb2550517917a655fc6eb6471fc575a32ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 13 Apr 2023 19:15:26 +0300 Subject: [PATCH] rust: Use `isinstance(d, build.StaticLibrary)` instead of comparing the type name string --- mesonbuild/backend/ninjabackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index cd860b81c..7fce48e5c 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1918,7 +1918,7 @@ class NinjaBackend(backends.Backend): d_name = d.name.replace('-', '_') args += ['--extern', '{}={}'.format(d_name, os.path.join(d.subdir, d.filename))] project_deps.append(RustDep(d_name, self.rust_crates[d.name].order)) - elif d.typename == 'static library': + elif isinstance(d, build.StaticLibrary): # Rustc doesn't follow Meson's convention that static libraries # are called .a, and import libraries are .lib, so we have to # manually handle that.