From 6ce74f78f002d40b98138ee2ba00bbb21af2630d Mon Sep 17 00:00:00 2001 From: Jane Losare-Lusby Date: Tue, 25 Mar 2025 11:56:55 -0700 Subject: replace extra_filename with strict version hash in metrics file names --- compiler/rustc_middle/src/ty/context.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/rustc_middle/src') diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 86248b495cd..8b6b2bc2493 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -1738,10 +1738,15 @@ impl<'tcx> TyCtxt<'tcx> { // - needs_metadata: for putting into crate metadata. // - instrument_coverage: for putting into coverage data (see // `hash_mir_source`). + // - metrics_dir: metrics use the strict version hash in the filenames + // for dumped metrics files to prevent overwriting distinct metrics + // for similar source builds (may change in the future, this is part + // of the proof of concept impl for the metrics initiative project goal) cfg!(debug_assertions) || self.sess.opts.incremental.is_some() || self.needs_metadata() || self.sess.instrument_coverage() + || self.sess.opts.unstable_opts.metrics_dir.is_some() } #[inline] -- cgit 1.4.1-3-g733a5