about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-07-03 03:15:07 +0900
committerGitHub <noreply@github.com>2021-07-03 03:15:07 +0900
commit45470a3bcd9f26017bcdbf4d5ae07be0d922ce93 (patch)
tree29167ced0c208a4a3db02536ba335b05fb2a23ee /compiler/rustc_session
parent851c82e88ade86bfe3b4ee785d5e5ab1d954b61c (diff)
parent67e6a813159b5438507d4c24201e452a110a8284 (diff)
downloadrust-45470a3bcd9f26017bcdbf4d5ae07be0d922ce93.tar.gz
rust-45470a3bcd9f26017bcdbf4d5ae07be0d922ce93.zip
Rollup merge of #84029 - drahnr:master, r=petrochenkov
add `track_path::path` fn for usage in `proc_macro`s

Adds a way to declare a dependency on external files without including them, to either re-trigger the build of a file as well as covering the use case of including dependencies within the `rustc` invocation, such that tools like `sccache`/`cachepot` are able to handle references to external files which are not included.

Ref #73921
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/parse.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs
index 7b7878e9c7f..226fde2343a 100644
--- a/compiler/rustc_session/src/parse.rs
+++ b/compiler/rustc_session/src/parse.rs
@@ -133,6 +133,8 @@ pub struct ParseSess {
     pub reached_eof: Lock<bool>,
     /// Environment variables accessed during the build and their values when they exist.
     pub env_depinfo: Lock<FxHashSet<(Symbol, Option<Symbol>)>>,
+    /// File paths accessed during the build.
+    pub file_depinfo: Lock<FxHashSet<Symbol>>,
     /// All the type ascriptions expressions that have had a suggestion for likely path typo.
     pub type_ascription_path_suggestions: Lock<FxHashSet<Span>>,
     /// Whether cfg(version) should treat the current release as incomplete
@@ -165,6 +167,7 @@ impl ParseSess {
             symbol_gallery: SymbolGallery::default(),
             reached_eof: Lock::new(false),
             env_depinfo: Default::default(),
+            file_depinfo: Default::default(),
             type_ascription_path_suggestions: Default::default(),
             assume_incomplete_release: false,
             proc_macro_quoted_spans: Default::default(),