Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce that UNTRACKED options are not accessed by queries #91866

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ impl Default for Options {
impl Options {
/// Returns `true` if there is a reason to build the dep graph.
pub fn build_dep_graph(&self) -> bool {
self.incremental.is_some()
self.get_incremental().is_some()
|| self.debugging_opts.dump_dep_graph
|| self.debugging_opts.query_dep_graph
}
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ impl Options {
self.cg.instrument_coverage.unwrap_or(InstrumentCoverage::Off)
== InstrumentCoverage::ExceptUnusedFunctions
}

pub fn get_incremental(&self) -> Option<PathBuf> {
self.incremental
}
}

top_level_options!(
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_session/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ impl Session {
}

pub fn incr_comp_session_dir_opt(&self) -> Option<cell::Ref<'_, PathBuf>> {
self.opts.incremental.as_ref().map(|_| self.incr_comp_session_dir())
self.opts.get_incremental().as_ref().map(|_| self.incr_comp_session_dir())
}

pub fn print_perf_stats(&self) {
Expand Down Expand Up @@ -937,7 +937,7 @@ impl Session {
// If incremental compilation is turned on, we default to a high number
// codegen units in order to reduce the "collateral damage" small
// changes cause.
if self.opts.incremental.is_some() {
if self.opts.get_incremental().is_some() {
return 256;
}

Expand Down