diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-06-23 20:53:20 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-06-23 20:53:20 +0300 |
commit | 2d23a44e6e6f5baf5d076015f583c61bebfd9fde (patch) | |
tree | 8b8554d722f46587a7710a5ac39cf51fd08004ca /rustrunner.py | |
parent | 2366f822d23792fa618da91989cee8e6785960fe (diff) | |
download | meson-2d23a44e6e6f5baf5d076015f583c61bebfd9fde.zip meson-2d23a44e6e6f5baf5d076015f583c61bebfd9fde.tar.gz meson-2d23a44e6e6f5baf5d076015f583c61bebfd9fde.tar.bz2 |
Deal with Rust static libraries, too.
Diffstat (limited to 'rustrunner.py')
-rwxr-xr-x | rustrunner.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rustrunner.py b/rustrunner.py index 4af196b..57e6124 100755 --- a/rustrunner.py +++ b/rustrunner.py @@ -30,6 +30,11 @@ def delete_old_crates(target_name, target_type): crates = glob.glob(base + '-*' + suffix) crates = [(os.stat(i).st_mtime, i) for i in crates] [os.unlink(c[1]) for c in sorted(crates)[:-1]] + if target_type == 'lib': + (base, suffix) = os.path.splitext(target_name) + crates = glob.glob(base + '-*' + '.rlib') # Rust does not use .a + crates = [(os.stat(i).st_mtime, i) for i in crates] + [os.unlink(c[1]) for c in sorted(crates)[:-1]] def invoke_rust(rustc_command): return subprocess.call(rustc_command, shell=False) |