summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2018-09-16 17:39:23 -0700
committerBert Belder <bertbelder@gmail.com>2018-09-16 18:37:18 -0700
commitba8757b44ac824b70c6e5ea10248c1d637716b0d (patch)
tree81d1f3910593244ee83fa786faedd16660ac9707
parentbdfaf1218656f55ac91e5a58a3298137d380e68a (diff)
build: properly rebuild rust crates when their deps change
-rw-r--r--build_extra/rust/rust.gni8
1 files changed, 7 insertions, 1 deletions
diff --git a/build_extra/rust/rust.gni b/build_extra/rust/rust.gni
index 1600602e0..85959e921 100644
--- a/build_extra/rust/rust.gni
+++ b/build_extra/rust/rust.gni
@@ -180,6 +180,8 @@ template("run_rustc") {
deps = []
}
+ inputs = []
+
# Build the list of '--extern' arguments from the 'extern_infos' array.
foreach(info, extern_infos) {
rlib = "$out_dir/lib${info.crate_name_and_version}.rlib"
@@ -187,7 +189,11 @@ template("run_rustc") {
"--extern",
info.crate_name + "=" + rebase_path(rlib, root_build_dir),
]
- deps += [ info.label ]
+ inputs += [ rlib ]
+ deps += [
+ "${info.label}_rustc",
+ info.label,
+ ]
}
}
}