Change:
Some(commit.to_string()) } <ins> fn parse_download_ci_llvm( &self, download_ci_llvm: Option<StringOrBool>, asserts: bool, ) -> bool { match download_ci_llvm { None => self.channel == "dev" && llvm::is_ci_llvm_available(&self, asserts), Some(StringOrBool::Bool(b)) => b, Some(StringOrBool::String(s)) if s == "if-available" => { llvm::is_ci_llvm_available(&self, asserts) } Some(StringOrBool::String(s)) if s == "if-unchanged" => { // Git is needed to track modifications here, but tarball source is not available. // If not modified here or built through tarball source, we maintain consistency // with '"if available"'. if !self.rust_info.is_from_tarball() && self .last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true) .is_none() { // there are some untracked changes in the the given paths. false } else { llvm::is_ci_llvm_available(&self, asserts) } } Some(StringOrBool::String(other)) => { panic!("unrecognized option for download-ci-llvm: {:?}", other) } } } /// Returns the last commit in which any of `modified_paths` were changed, /// or `None` if there are untracked changes in the working directory and `if_unchanged` is true. pub fn last_modified_commit( &self, modified_paths: &[&str], option_name: &str, if_unchanged: bool, ) -> Option<String> { // Handle running from a directory other than the top level let top_level = output(self.git().args(&["rev-parse", "--show-toplevel"])); let top_level = top_level.trim_end(); // Look for a version to compare to based on the current commit. // Only commits merged by bors will have CI artifacts. let merge_base = output( self.git() .arg("rev-list") .arg(format!("--author={}", self.stage0_metadata.config.git_merge_commit_email)) .args(&["-n1", "--first-parent", "HEAD"]), ); let commit = merge_base.trim_end(); if commit.is_empty() { println!("error: could not find commit hash for downloading components from CI"); println!("help: maybe your repository history is too shallow?"); println!("help: consider disabling `{option_name}`"); println!("help: or fetch enough history to include one upstream commit"); crate::exit!(1); } // Warn if there were changes to the compiler or standard library since the ancestor commit. let mut git = self.git(); git.args(&["diff-index", "--quiet", &commit, "--"]); for path in modified_paths { git.arg(format!("{top_level}/{path}")); } let has_changes = !t!(git.status()).success(); if has_changes { if if_unchanged { if self.verbose > 0 { println!( "warning: saw changes to one of {modified_paths:?} since {commit};  ignoring `{option_name}`" ); } return None; } println!( "warning: `{option_name}` is enabled, but there are changes to one of {modified_paths:?}" ); } Some(commit.to_string()) } </ins> } fn set<T>(field: &mut T, val: Option<T>) {

Discussion:
The profile is intended not just for people working on LLVM itself, but also anyone who touches codegen but not LLVM. For example, anyone who modifies or is only changing the IR we send to LLVM, not LLVM itself. We should keep on for them but not for , but ideally we wouldn't build LLVM from source if it's unmodified. points out some things that we should fix before enabling that option by default for the profile: Originally posted by in <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
claim Should all 3 tasks be in one PR or is it 3 separate PR's?
I'd say it depends how challenging they are - if it's simple to fix all three in one PR that seems fine, but if it takes a more than a day to do one of the tasks, it probably makes sense to open a PR for it early.
I think I can tackle points 1 and 3 by tonight so I'll make that into one PR. I'll open a separate PR for the second point, since I think it has more work involved, if that's alright :)
release-assignment