From ba8757b44ac824b70c6e5ea10248c1d637716b0d Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Sun, 16 Sep 2018 17:39:23 -0700 Subject: [PATCH] build: properly rebuild rust crates when their deps change --- build_extra/rust/rust.gni | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build_extra/rust/rust.gni b/build_extra/rust/rust.gni index 1600602e08..85959e921c 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, + ] } } }