From 0b06db57d1e0094f829166aae4bc5342f50bc914 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 20 Feb 2017 22:34:42 -0500 Subject: [PATCH] incr-comp: track the -Z sanitizer flag closes #39611 --- src/librustc/session/config.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index 24615f2fa6992..fe8ba75d11f6a 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -51,7 +51,7 @@ pub struct Config { pub uint_type: UintTy, } -#[derive(Clone)] +#[derive(Clone, Hash)] pub enum Sanitizer { Address, Leak, @@ -970,7 +970,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "encode MIR of all functions into the crate metadata"), osx_rpath_install_name: bool = (false, parse_bool, [TRACKED], "pass `-install_name @rpath/...` to the OSX linker"), - sanitizer: Option = (None, parse_sanitizer, [UNTRACKED], + sanitizer: Option = (None, parse_sanitizer, [TRACKED], "Use a sanitizer"), } @@ -1728,7 +1728,7 @@ mod dep_tracking { use std::path::PathBuf; use std::collections::hash_map::DefaultHasher; use super::{Passes, CrateType, OptLevel, DebugInfoLevel, - OutputTypes, Externs, ErrorOutputType}; + OutputTypes, Externs, ErrorOutputType, Sanitizer}; use syntax::feature_gate::UnstableFeatures; use rustc_back::PanicStrategy; @@ -1781,6 +1781,8 @@ mod dep_tracking { impl_dep_tracking_hash_via_hash!(Externs); impl_dep_tracking_hash_via_hash!(OutputTypes); impl_dep_tracking_hash_via_hash!(cstore::NativeLibraryKind); + impl_dep_tracking_hash_via_hash!(Sanitizer); + impl_dep_tracking_hash_via_hash!(Option); impl_dep_tracking_hash_for_sortable_vec_of!(String); impl_dep_tracking_hash_for_sortable_vec_of!(CrateType);