Skip to content

Commit 2938c8d

Browse files
committed
add "library" to RUSTC_IF_UNCHANGED_ALLOWED_PATHS
Signed-off-by: onur-ozkan <[email protected]>
1 parent fcee761 commit 2938c8d

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/bootstrap/src/core/config/config.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ use crate::utils::helpers::{self, exe, output, t};
4545
/// final output/compiler, which can be significantly affected by changes made to the bootstrap sources.
4646
#[rustfmt::skip] // We don't want rustfmt to oneline this list
4747
pub(crate) const RUSTC_IF_UNCHANGED_ALLOWED_PATHS: &[&str] = &[
48+
"!library",
4849
":!src/tools",
4950
":!src/librustdoc",
5051
":!src/rustdoc-json-types",
@@ -3150,24 +3151,10 @@ impl Config {
31503151
}
31513152
};
31523153

3153-
// RUSTC_IF_UNCHANGED_ALLOWED_PATHS
3154-
let mut allowed_paths = RUSTC_IF_UNCHANGED_ALLOWED_PATHS.to_vec();
3155-
3156-
// In CI, disable ci-rustc if there are changes in the library tree. But for non-CI, allow
3157-
// these changes to speed up the build process for library developers. This provides consistent
3158-
// functionality for library developers between `download-rustc=true` and `download-rustc="if-unchanged"`
3159-
// options.
3160-
//
3161-
// If you update "library" logic here, update `builder::tests::ci_rustc_if_unchanged_logic` test
3162-
// logic accordingly.
3163-
if !self.is_running_on_ci {
3164-
allowed_paths.push(":!library");
3165-
}
3166-
31673154
let commit = if self.rust_info.is_managed_git_subrepository() {
31683155
// Look for a version to compare to based on the current commit.
31693156
// Only commits merged by bors will have CI artifacts.
3170-
let freshness = self.check_path_modifications(&allowed_paths);
3157+
let freshness = self.check_path_modifications(RUSTC_IF_UNCHANGED_ALLOWED_PATHS);
31713158
self.verbose(|| {
31723159
eprintln!("rustc freshness: {freshness:?}");
31733160
});

0 commit comments

Comments
 (0)