@@ -52,6 +52,21 @@ pub(crate) const RUSTC_IF_UNCHANGED_ALLOWED_PATHS: &[&str] = &[
5252 ":!triagebot.toml" ,
5353] ;
5454
55+ /// Additional "allowed" paths for the `download-rustc="if-unchanged"` logic
56+ /// that apply to local dev builds, but not to CI builds.
57+ ///
58+ /// When modifying this list, the corresponding tests in
59+ /// `builder::tests::ci_rustc_if_unchanged_logic` should also be updated.
60+ const RUSTC_IF_UNCHANGED_EXTRA_ALLOWED_PATHS_OUTSIDE_CI : & [ & str ] = & [
61+ // tidy-alphabetical-start
62+ // In CI, disable ci-rustc if there are changes in the library tree. But for non-CI, allow
63+ // these changes to speed up the build process for library developers. This provides consistent
64+ // functionality for library developers between `download-rustc=true` and `download-rustc="if-unchanged"`
65+ // options.
66+ ":!library" ,
67+ // tidy-alphabetical-end
68+ ] ;
69+
5570macro_rules! check_ci_llvm {
5671 ( $name: expr) => {
5772 assert!(
@@ -3180,16 +3195,8 @@ impl Config {
31803195
31813196 // RUSTC_IF_UNCHANGED_ALLOWED_PATHS
31823197 let mut allowed_paths = RUSTC_IF_UNCHANGED_ALLOWED_PATHS . to_vec ( ) ;
3183-
3184- // In CI, disable ci-rustc if there are changes in the library tree. But for non-CI, allow
3185- // these changes to speed up the build process for library developers. This provides consistent
3186- // functionality for library developers between `download-rustc=true` and `download-rustc="if-unchanged"`
3187- // options.
3188- //
3189- // If you update "library" logic here, update `builder::tests::ci_rustc_if_unchanged_logic` test
3190- // logic accordingly.
31913198 if !self . is_running_on_ci {
3192- allowed_paths. push ( ":!library" ) ;
3199+ allowed_paths. extend_from_slice ( RUSTC_IF_UNCHANGED_EXTRA_ALLOWED_PATHS_OUTSIDE_CI ) ;
31933200 }
31943201
31953202 let commit = if self . rust_info . is_managed_git_subrepository ( ) {
0 commit comments