aboutsummaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-10-11 23:30:52 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-10-11 23:30:52 +0300
commitd952812b1bddd2e4a7c0dd60da5ac17757182cee (patch)
tree21da327e2e1df815f2a301fdc7cd46b158da00e8 /build.py
parent7c9c03b43078c67b3bee3babf03bdbdf4aba426a (diff)
downloadmeson-d952812b1bddd2e4a7c0dd60da5ac17757182cee.zip
meson-d952812b1bddd2e4a7c0dd60da5ac17757182cee.tar.gz
meson-d952812b1bddd2e4a7c0dd60da5ac17757182cee.tar.bz2
Fix Rust to work with 1.3 release. Closes #277.
Diffstat (limited to 'build.py')
-rw-r--r--build.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/build.py b/build.py
index 6d263f1..8b372f3 100644
--- a/build.py
+++ b/build.py
@@ -620,6 +620,8 @@ class StaticLibrary(BuildTarget):
raise InvalidArguments('Static libraries not supported for C#.')
self.prefix = environment.get_static_lib_prefix()
self.suffix = environment.get_static_lib_suffix()
+ if len(self.sources) > 0 and self.sources[0].endswith('.rs'):
+ self.suffix = 'rlib'
self.filename = self.prefix + self.name + '.' + self.suffix
def get_import_filename(self):
@@ -642,6 +644,8 @@ class SharedLibrary(BuildTarget):
else:
self.prefix = environment.get_shared_lib_prefix()
self.suffix = environment.get_shared_lib_suffix()
+ if len(self.sources) > 0 and self.sources[0].endswith('.rs'):
+ self.suffix = 'rlib'
self.importsuffix = environment.get_import_lib_suffix()
self.filename = self.prefix + self.name + '.' + self.suffix