Skip to content

Commit 4b10bf5

Browse files
committed
Add codegen backend dylib back into depinfo (.d) post-rust-lang/rust#93969.
1 parent 6dc23af commit 4b10bf5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

crates/spirv-builder/src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,10 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {
419419

420420
let mut rustflags = vec![
421421
format!("-Zcodegen-backend={}", rustc_codegen_spirv.display()),
422+
// Ensure the codegen backend is emitted in `.d` files to force Cargo
423+
// to rebuild crates compiled with it when it changes (this used to be
424+
// the default until https://github.com/rust-lang/rust/pull/93969).
425+
"-Zbinary-dep-depinfo".to_string(),
422426
"-Csymbol-mangling-version=v0".to_string(),
423427
];
424428

tests/src/main.rs

+4
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,10 @@ fn rust_flags(codegen_backend_path: &Path) -> String {
323323

324324
[
325325
&*format!("-Zcodegen-backend={}", codegen_backend_path.display()),
326+
// Ensure the codegen backend is emitted in `.d` files to force Cargo
327+
// to rebuild crates compiled with it when it changes (this used to be
328+
// the default until https://github.com/rust-lang/rust/pull/93969).
329+
"-Zbinary-dep-depinfo",
326330
"-Coverflow-checks=off",
327331
"-Cdebug-assertions=off",
328332
"-Cdebuginfo=2",

0 commit comments

Comments
 (0)