diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-11-12 22:32:33 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-12-16 19:22:18 +0530 |
commit | 580c8512c17154a7a18bb1e3853f4c9e9171490e (patch) | |
tree | 0a87f68c2154aeb90d5dc34c3b5948057a3039b5 /mesonbuild/mesonlib.py | |
parent | b3b3a7d9331589d69afc4b8eb7f9fbef96b8cf67 (diff) | |
download | meson-nirbheek/cargo-module.tar.gz |
WIP: Add an unstable module for Rust Cargo supportnirbheek/cargo-module
Currently only supports building staticlib libraries and binaries with
Cargo. All configuration must be in the Cargo.toml file.
You should use cargo 0.23 because it fixes a bug in emitting dep-info
FIXMEs:
* Cross compilation is broken. We do not pass the `--target TRIPLE` flag
to cargo, so it always builds targetting the build machine.
* tests and benches are currently not supported, but can be added
* cdylibs are not supported because it is not clear if anyone uses them
and if they even work properly in Rust
* `ninja dist` does not yet run `cargo vendor` to add crate sources
* `cargo clean` is not called on `ninja clean`
* We cannot handle adding system libraries that are needed by the
staticlib while linking because it's outputted at build time
by `cargo build`. You must handle that yourself.
* We do not pass on RUSTFLAGS from the env during configure to cargo
build.
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r-- | mesonbuild/mesonlib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 9ad066821..cb8ad8734 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -661,6 +661,8 @@ def expand_arguments(args): return None return expended_args +Popen_safe_errors = (FileNotFoundError, PermissionError, subprocess.CalledProcessError) + def Popen_safe(args, write=None, stderr=subprocess.PIPE, **kwargs): if sys.version_info < (3, 6) or not sys.stdout.encoding: return Popen_safe_legacy(args, write=write, stderr=stderr, **kwargs) |