rust: Use `isinstance(d, build.StaticLibrary)` instead of comparing the type name string

pull/9468/merge
Sebastian Dröge 2 years ago committed by Xavier Claessens
parent e184fc84b3
commit 1c00cb2550
  1. 2
      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.

Loading…
Cancel
Save