about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-11 06:03:23 +0000
committerbors <bors@rust-lang.org>2020-10-11 06:03:23 +0000
commitfb27a7db50766edce618c60e5e241c871abbeeec (patch)
tree7c42bb87363cc6176a3b64d9540da1f0226558dd /compiler/rustc_interface/src
parent9a8ca69602fac58362df66a3fc9028211c6d6f2a (diff)
parentba22fbe58494784e3ee2a6800bb16588da2f595b (diff)
downloadrust-fb27a7db50766edce618c60e5e241c871abbeeec.tar.gz
rust-fb27a7db50766edce618c60e5e241c871abbeeec.zip
Auto merge of #77565 - khyperia:codegen-backend-dep, r=ecstatic-morse
Add -Z codegen-backend dylib to deps

When the codegen-backend dylib changes, the program should be rebuilt.

---

Unfortunately I was unable to test this works locally due to running into a TLS issue when running the custom backend, `thread 'rustc' panicked at 'no ImplicitCtxt stored in tls', compiler/rustc_middle/src/ty/context.rs:1750:54`, which seems similar to https://github.com/rust-lang/rust/issues/62717 but has a completely different cause and backtrace.

`@eddyb` said to ping `@Mark-Simulacrum` about what they think about this, so, ping!
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/passes.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs
index 66d3765d347..d9c24cc3994 100644
--- a/compiler/rustc_interface/src/passes.rs
+++ b/compiler/rustc_interface/src/passes.rs
@@ -551,6 +551,10 @@ fn write_out_deps(
             .map(|fmap| escape_dep_filename(&fmap.unmapped_path.as_ref().unwrap_or(&fmap.name)))
             .collect();
 
+        if let Some(ref backend) = sess.opts.debugging_opts.codegen_backend {
+            files.push(backend.to_string());
+        }
+
         if sess.binary_dep_depinfo() {
             boxed_resolver.borrow().borrow_mut().access(|resolver| {
                 for cnum in resolver.cstore().crates_untracked() {