diff options
| author | onur-ozkan <work@onurozkan.dev> | 2023-10-01 16:54:52 +0300 |
|---|---|---|
| committer | onur-ozkan <work@onurozkan.dev> | 2023-10-01 16:54:52 +0300 |
| commit | 957de61594635d473b488eacbb2cc0093645e6a4 (patch) | |
| tree | eaaad8093b04753fa071d9773d63199abcdd39ed /src/bootstrap/lib.rs | |
| parent | e39976ff89f91b742916349859e8d877a4876783 (diff) | |
| download | rust-957de61594635d473b488eacbb2cc0093645e6a4.tar.gz rust-957de61594635d473b488eacbb2cc0093645e6a4.zip | |
implement major change tracking for the bootstrap configuration
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Diffstat (limited to 'src/bootstrap/lib.rs')
| -rw-r--r-- | src/bootstrap/lib.rs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 671d25484d0..b067e3eec98 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -112,7 +112,15 @@ const LLVM_TOOLS: &[&str] = &[ /// LLD file names for all flavors. const LLD_FILE_NAMES: &[&str] = &["ld.lld", "ld64.lld", "lld-link", "wasm-ld"]; -pub const VERSION: usize = 2; +/// Keeps track of major changes made to the bootstrap configuration. +/// +/// These values also represent the IDs of the PRs that caused major changes. +/// You can visit `https://github.com/rust-lang/rust/pull/{any-id-from-the-list}` to +/// check for more details regarding each change. +/// +/// If you make any major changes (such as adding new values or changing default values), please +/// ensure that the associated PR ID is added to the end of this list. +pub const CONFIG_CHANGE_HISTORY: &[usize] = &[115898]; /// Extra --check-cfg to add when building /// (Mode restriction, config name, config values (if any)) @@ -1841,3 +1849,16 @@ fn envify(s: &str) -> String { .flat_map(|c| c.to_uppercase()) .collect() } + +pub fn find_recent_config_change_ids(current_id: usize) -> Vec<usize> { + let index = CONFIG_CHANGE_HISTORY + .iter() + .position(|&id| id == current_id) + .expect(&format!("Value `{}` was not found in `CONFIG_CHANGE_HISTORY`.", current_id)); + + CONFIG_CHANGE_HISTORY + .iter() + .skip(index + 1) // Skip the current_id and IDs before it + .cloned() + .collect() +} |
