@@ -15,7 +15,9 @@ use std::{cmp, env, fs};
15
15
16
16
use build_helper:: ci:: CiEnv ;
17
17
use build_helper:: exit;
18
- use build_helper:: git:: { GitConfig , PathFreshness , check_path_modifications, output_result} ;
18
+ use build_helper:: git:: {
19
+ GitConfig , PathFreshness , check_path_modifications, get_closest_merge_commit, output_result,
20
+ } ;
19
21
use serde:: { Deserialize , Deserializer } ;
20
22
use serde_derive:: Deserialize ;
21
23
#[ cfg( feature = "tracing" ) ]
@@ -1910,6 +1912,7 @@ impl Config {
1910
1912
debug_assertions_requested,
1911
1913
config. llvm_assertions ,
1912
1914
) ;
1915
+ panic ! ( "DOWNLOAD_CI_RUSTC: {:?}" , config. download_rustc_commit) ;
1913
1916
1914
1917
debug = debug_toml;
1915
1918
rustc_debug_assertions = rustc_debug_assertions_toml;
@@ -2974,12 +2977,22 @@ impl Config {
2974
2977
// options.
2975
2978
if !CiEnv :: is_ci ( ) {
2976
2979
allowed_paths. push ( ":!library" ) ;
2980
+ } else {
2981
+ allowed_paths. push ( ":!src/bootstrap" ) ;
2982
+ allowed_paths. push ( ":!.github" ) ;
2983
+ allowed_paths. push ( ":!Cargo.lock" ) ;
2984
+ allowed_paths. push ( ":!config.example.toml" ) ;
2985
+ allowed_paths. push ( ":!license-metadata.json" ) ;
2986
+ allowed_paths. push ( ":!triagebot.toml" ) ;
2987
+ allowed_paths. push ( ":!src" ) ;
2977
2988
}
2978
2989
2979
2990
let commit = if self . rust_info . is_managed_git_subrepository ( ) {
2980
2991
// Look for a version to compare to based on the current commit.
2981
2992
// Only commits merged by bors will have CI artifacts.
2982
- match self . check_modifications ( & allowed_paths) {
2993
+ let modifications = self . check_modifications ( & allowed_paths) ;
2994
+ eprintln ! ( "DOWNLOAD_CI_RUSTC freshness: {modifications:?}" ) ;
2995
+ match modifications {
2983
2996
PathFreshness :: LastModifiedUpstream { upstream } => upstream,
2984
2997
PathFreshness :: HasLocalModifications { upstream } => {
2985
2998
if if_unchanged {
@@ -3020,6 +3033,35 @@ impl Config {
3020
3033
asserts : bool ,
3021
3034
) -> bool {
3022
3035
let download_ci_llvm = download_ci_llvm. unwrap_or ( StringOrBool :: Bool ( true ) ) ;
3036
+ let freshness = self . check_modifications ( & [
3037
+ "src/llvm-project" ,
3038
+ "src/bootstrap/download-ci-llvm-stamp" ,
3039
+ "src/version" ,
3040
+ ] ) ;
3041
+ let sha = get_closest_merge_commit (
3042
+ Some ( & self . src ) ,
3043
+ & self . git_config ( ) ,
3044
+ & [
3045
+ self . src . join ( "src/llvm-project" ) ,
3046
+ self . src . join ( "src/bootstrap/download-ci-llvm-stamp" ) ,
3047
+ // the LLVM shared object file is named `LLVM-12-rust-{version}-nightly`
3048
+ self . src . join ( "src/version" ) ,
3049
+ ] ,
3050
+ )
3051
+ . unwrap ( ) ;
3052
+ let head = String :: from_utf8 (
3053
+ Command :: new ( "git" )
3054
+ . current_dir ( & self . src )
3055
+ . arg ( "rev-parse" )
3056
+ . arg ( "HEAD" )
3057
+ . output ( )
3058
+ . unwrap ( )
3059
+ . stdout ,
3060
+ )
3061
+ . unwrap ( )
3062
+ . trim ( )
3063
+ . to_string ( ) ;
3064
+ eprintln ! ( "LLVM FRESHNESS: {freshness:?}\n Old git SHA: {sha}\n HEAD: {head}" ) ;
3023
3065
3024
3066
let if_unchanged = || {
3025
3067
if self . rust_info . is_from_tarball ( ) {
0 commit comments