From 875603e31d266b92b361cdb79031a9d03d3a259d Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Fri, 14 Oct 2022 16:12:07 +0300 Subject: [PATCH] Add codegen backend dylib back into depinfo (.d) post-rust-lang/rust#93969. --- crates/spirv-builder/src/lib.rs | 4 ++++ tests/src/main.rs | 4 ++++ 2 files changed, 8 insertions(+) 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",