diff --git a/crates/spirv-builder/src/lib.rs b/crates/spirv-builder/src/lib.rs index ea7a8ae283..db6fcff2e6 100644 --- a/crates/spirv-builder/src/lib.rs +++ b/crates/spirv-builder/src/lib.rs @@ -419,6 +419,10 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result { let mut rustflags = vec![ format!("-Zcodegen-backend={}", rustc_codegen_spirv.display()), + // Ensure the codegen backend is emitted in `.d` files to force Cargo + // to rebuild crates compiled with it when it changes (this used to be + // the default until https://github.com/rust-lang/rust/pull/93969). + "-Zbinary-dep-depinfo".to_string(), "-Csymbol-mangling-version=v0".to_string(), ]; diff --git a/tests/src/main.rs b/tests/src/main.rs index a87fe774fe..33cacf95cd 100644 --- a/tests/src/main.rs +++ b/tests/src/main.rs @@ -323,6 +323,10 @@ fn rust_flags(codegen_backend_path: &Path) -> String { [ &*format!("-Zcodegen-backend={}", codegen_backend_path.display()), + // Ensure the codegen backend is emitted in `.d` files to force Cargo + // to rebuild crates compiled with it when it changes (this used to be + // the default until https://github.com/rust-lang/rust/pull/93969). + "-Zbinary-dep-depinfo", "-Coverflow-checks=off", "-Cdebug-assertions=off", "-Cdebuginfo=2",