aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-01-19 10:12:38 -0800
committerDylan Baker <dylan@pnwbakers.com>2021-01-19 10:12:38 -0800
commit3ae115b57ad7f8eca09c03f5bd6bf65604dcaf59 (patch)
tree7e2c18c073c0b6d2463114d4d6ee9ce5633fd57a /mesonbuild/build.py
parentc64d4070763b2daf82a50a7b4f5b130b2bb91062 (diff)
downloadmeson-3ae115b57ad7f8eca09c03f5bd6bf65604dcaf59.zip
meson-3ae115b57ad7f8eca09c03f5bd6bf65604dcaf59.tar.gz
meson-3ae115b57ad7f8eca09c03f5bd6bf65604dcaf59.tar.bz2
Replace NinjaBackend is_rust_target with build.uses_rust
we have two functions to do the exact same thing, and they're basically implemented the same way. Instead, let's just use the BuildTarget one, as it's more generally available.
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 017b0f0..fa7c140 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -1412,7 +1412,7 @@ You probably should put it in link_with instead.''')
m = 'Could not get a dynamic linker for build target {!r}'
raise AssertionError(m.format(self.name))
- def get_using_rustc(self) -> bool:
+ def uses_rust(self) -> bool:
"""Is this target a rust target."""
return self.sources and self.sources[0].fname.endswith('.rs')
@@ -1687,7 +1687,7 @@ class Executable(BuildTarget):
self.import_filename = self.gcc_import_filename
if m.is_windows() and ('cs' in self.compilers or
- self.get_using_rustc() or
+ self.uses_rust() or
self.get_using_msvc()):
self.debug_filename = self.name + '.pdb'
@@ -1877,7 +1877,7 @@ class SharedLibrary(BuildTarget):
suffix = 'dll'
self.vs_import_filename = '{0}{1}.lib'.format(self.prefix if self.prefix is not None else '', self.name)
self.gcc_import_filename = '{0}{1}.dll.a'.format(self.prefix if self.prefix is not None else 'lib', self.name)
- if self.get_using_rustc():
+ if self.uses_rust():
# Shared library is of the form foo.dll
prefix = ''
# Import library is called foo.dll.lib