Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
6 changes: 5 additions & 1 deletion compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ macro_rules! top_level_options {
pub struct Options {
$(
$( #[$attr] )*
pub $opt: $t
$opt: $t
),*
}

Expand Down 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