mirror of https://github.com/linkerd/linkerd2.git
Use cargo:rerun-if-changed to avoid recompiling protos (#160)
As @seanmonstar noticed, the build script will currently re-compile all the protobufs regardless of whether or not they have changed, making the build much slower. This PR modifies it to emit `cargo:rerun-if-changed=` for all the protobuf files, so they will only be regenerated if one of them changes. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit is contained in:
parent
612bd0f7a0
commit
2b20a8bb10
|
@ -24,4 +24,9 @@ fn build_control() {
|
|||
.enable_server(true)
|
||||
.build(server_files, dirs)
|
||||
.unwrap();
|
||||
|
||||
// recompile protobufs only if any of the proto files changes.
|
||||
for file in client_files.iter().chain(server_files) {
|
||||
println!("cargo:rerun-if-changed={}", file);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue