From c681a884efa99cd14301553aacc42b702eac8b00 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sun, 13 Feb 2022 19:24:15 +0100 Subject: Don't include invalid paths in the depinfo for builtin backends --- compiler/rustc_interface/src/passes.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_interface/src') diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 7640b9a7413..5a4b4df6772 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -648,7 +648,11 @@ fn write_out_deps( if sess.binary_dep_depinfo() { if let Some(ref backend) = sess.opts.debugging_opts.codegen_backend { - files.push(backend.to_string()); + if backend.contains('.') { + // If the backend name contain a `.`, it is the path to an external dynamic + // library. If not, it is not a path. + files.push(backend.to_string()); + } } boxed_resolver.borrow_mut().access(|resolver| { -- cgit 1.4.1-3-g733a5