Skip to content

Commit 0a60fd6

Browse files
Firestar99LegNeato
authored andcommitted
cargo-gpu: rerun build script when Cargo.lock changes
close #575
1 parent e2cdfbd commit 0a60fd6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/cargo-gpu-install/src/install.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,11 @@ package = "rustc_codegen_spirv"
250250
std::env::consts::DLL_SUFFIX
251251
);
252252

253+
#[allow(clippy::print_stdout)]
253254
if self.build_script {
254-
#[allow(clippy::print_stdout)]
255+
let root = metadata.workspace_root.as_path();
256+
println!("cargo:rerun-if-changed={root}/Cargo.lock");
257+
255258
if let SpirvSource::Path {
256259
rust_gpu_repo_root, ..
257260
} = &source

0 commit comments

Comments
 (0)