diff options
author | Goffert van Gool <ruphin@ruphin.net> | 2018-12-13 22:16:58 +0100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-12-13 16:16:58 -0500 |
commit | 40d6daf8240f9dc090c23f975488c424b88f120f (patch) | |
tree | 5b502de7a3d286861fb826f4242004a2e8218b25 /build_extra/rust/rust.gni | |
parent | 07369a6270473a2e4eb74d0c1936284d3b9558f3 (diff) |
Read version from Cargo.toml (#1267)
Diffstat (limited to 'build_extra/rust/rust.gni')
-rw-r--r-- | build_extra/rust/rust.gni | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build_extra/rust/rust.gni b/build_extra/rust/rust.gni index 3263f0018..61731d21c 100644 --- a/build_extra/rust/rust.gni +++ b/build_extra/rust/rust.gni @@ -49,6 +49,7 @@ template("rust_crate") { "crate_type", "crate_version", "deps", + "inputs", "features", "is_test", "libs", @@ -190,6 +191,13 @@ template("rust_crate") { "--color=always", ] + if (defined(crate_version)) { + args += [ + # This is used to set env variables for Cargo build compatibility + "--cargo-pkg-version=$crate_version", + ] + } + if (is_debug) { args += [ "-g" ] } |