about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-01-07 15:22:00 +0000
committerbors <bors@rust-lang.org>2025-01-07 15:22:00 +0000
commitad211ced81509462cdfe4c29ed10f97279a0acae (patch)
treed7a8e3791fcc40fca85d9537f62ecf659ab56709 /src
parentfb546ee09b226bc4dd4b712d35a372d923c4fa54 (diff)
parent225ffebc0a5785c6316c6b544e1700245957de9f (diff)
Auto merge of #135202 - GuillaumeGomez:rollup-9xgs39t, r=GuillaumeGomez
Rollup of 9 pull requests

Successful merges:

 - #135081 (bootstrap: Build jemalloc with support for 64K pages)
 - #135174 ([AIX] Port test case run-make/reproducible-build )
 - #135177 (llvm: Ignore error value that is always false)
 - #135182 (Transmute from NonNull to pointer when elaborating a box deref (MCP807))
 - #135187 (apply a workaround fix for the release roadblock)
 - #135189 (Remove workaround from pull request template)
 - #135193 (don't bless `proc_macro_deps.rs` unless it's necessary)
 - #135198 (Avoid naming variables `str`)
 - #135199 (Eliminate an unnecessary `Symbol::to_string`; use `as_str`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs9
-rw-r--r--src/build_helper/src/git.rs13
-rw-r--r--src/tools/compiletest/src/compute_diff.rs14
-rw-r--r--src/tools/tidy/src/deps.rs17
4 files changed, 38 insertions, 15 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index 148b96181d1..b4c56df6ea6 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -1207,6 +1207,15 @@ pub fn rustc_cargo_env(
             rustc_llvm_env(builder, cargo, target)
         }
     }
+
+    // Build jemalloc on AArch64 with support for page sizes up to 64K
+    // See: https://github.com/rust-lang/rust/pull/135081
+    if builder.config.jemalloc
+        && target.starts_with("aarch64")
+        && env::var_os("JEMALLOC_SYS_WITH_LG_PAGE").is_none()
+    {
+        cargo.env("JEMALLOC_SYS_WITH_LG_PAGE", "16");
+    }
 }
 
 /// Pass down configuration from the LLVM build into the build of
diff --git a/src/build_helper/src/git.rs b/src/build_helper/src/git.rs
index 2aad5650fa8..01bac1498c2 100644
--- a/src/build_helper/src/git.rs
+++ b/src/build_helper/src/git.rs
@@ -129,8 +129,19 @@ pub fn get_closest_merge_commit(
         git.current_dir(git_dir);
     }
 
+    let channel = include_str!("../../ci/channel");
+
     let merge_base = {
-        if CiEnv::is_ci() {
+        if CiEnv::is_ci() &&
+            // FIXME: When running on rust-lang managed CI and it's not a nightly build,
+            // `git_upstream_merge_base` fails with an error message similar to this:
+            // ```
+            //    called `Result::unwrap()` on an `Err` value: "command did not execute successfully:
+            //    cd \"/checkout\" && \"git\" \"merge-base\" \"origin/master\" \"HEAD\"\nexpected success, got: exit status: 1\n"
+            // ```
+            // Investigate and resolve this issue instead of skipping it like this.
+            (channel == "nightly" || !CiEnv::is_rust_lang_managed_ci_job())
+        {
             git_upstream_merge_base(config, git_dir).unwrap()
         } else {
             // For non-CI environments, ignore rust-lang/rust upstream as it usually gets
diff --git a/src/tools/compiletest/src/compute_diff.rs b/src/tools/compiletest/src/compute_diff.rs
index 92c80c27de0..4c942c51bae 100644
--- a/src/tools/compiletest/src/compute_diff.rs
+++ b/src/tools/compiletest/src/compute_diff.rs
@@ -31,7 +31,7 @@ pub fn make_diff(expected: &str, actual: &str, context_size: usize) -> Vec<Misma
 
     for result in diff::lines(expected, actual) {
         match result {
-            diff::Result::Left(str) => {
+            diff::Result::Left(s) => {
                 if lines_since_mismatch >= context_size && lines_since_mismatch > 0 {
                     results.push(mismatch);
                     mismatch = Mismatch::new(line_number - context_queue.len() as u32);
@@ -41,11 +41,11 @@ pub fn make_diff(expected: &str, actual: &str, context_size: usize) -> Vec<Misma
                     mismatch.lines.push(DiffLine::Context(line.to_owned()));
                 }
 
-                mismatch.lines.push(DiffLine::Expected(str.to_owned()));
+                mismatch.lines.push(DiffLine::Expected(s.to_owned()));
                 line_number += 1;
                 lines_since_mismatch = 0;
             }
-            diff::Result::Right(str) => {
+            diff::Result::Right(s) => {
                 if lines_since_mismatch >= context_size && lines_since_mismatch > 0 {
                     results.push(mismatch);
                     mismatch = Mismatch::new(line_number - context_queue.len() as u32);
@@ -55,18 +55,18 @@ pub fn make_diff(expected: &str, actual: &str, context_size: usize) -> Vec<Misma
                     mismatch.lines.push(DiffLine::Context(line.to_owned()));
                 }
 
-                mismatch.lines.push(DiffLine::Resulting(str.to_owned()));
+                mismatch.lines.push(DiffLine::Resulting(s.to_owned()));
                 lines_since_mismatch = 0;
             }
-            diff::Result::Both(str, _) => {
+            diff::Result::Both(s, _) => {
                 if context_queue.len() >= context_size {
                     let _ = context_queue.pop_front();
                 }
 
                 if lines_since_mismatch < context_size {
-                    mismatch.lines.push(DiffLine::Context(str.to_owned()));
+                    mismatch.lines.push(DiffLine::Context(s.to_owned()));
                 } else if context_size > 0 {
-                    context_queue.push_back(str);
+                    context_queue.push_back(s);
                 }
 
                 line_number += 1;
diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs
index b71ce92771a..d4cbc37f6d2 100644
--- a/src/tools/tidy/src/deps.rs
+++ b/src/tools/tidy/src/deps.rs
@@ -619,12 +619,17 @@ fn check_proc_macro_dep_list(root: &Path, cargo: &Path, bless: bool, bad: &mut b
     }
     // Remove the proc-macro crates themselves
     proc_macro_deps.retain(|pkg| !is_proc_macro_pkg(&metadata[pkg]));
-    let proc_macro_deps_iter = proc_macro_deps.into_iter().map(|dep| metadata[dep].name.clone());
 
-    if bless {
-        let mut proc_macro_deps: Vec<_> = proc_macro_deps_iter.collect();
+    let proc_macro_deps: HashSet<_> =
+        proc_macro_deps.into_iter().map(|dep| metadata[dep].name.clone()).collect();
+    let expected = proc_macro_deps::CRATES.iter().map(|s| s.to_string()).collect::<HashSet<_>>();
+
+    let needs_blessing = proc_macro_deps.difference(&expected).next().is_some()
+        || expected.difference(&proc_macro_deps).next().is_some();
+
+    if needs_blessing && bless {
+        let mut proc_macro_deps: Vec<_> = proc_macro_deps.into_iter().collect();
         proc_macro_deps.sort();
-        proc_macro_deps.dedup();
         let mut file = File::create(root.join("src/bootstrap/src/utils/proc_macro_deps.rs"))
             .expect("`proc_macro_deps` should exist");
         writeln!(
@@ -646,10 +651,8 @@ pub static CRATES: &[&str] = &[
         )
         .unwrap();
     } else {
-        let proc_macro_deps: HashSet<_> = proc_macro_deps_iter.collect();
-        let expected =
-            proc_macro_deps::CRATES.iter().map(|s| s.to_string()).collect::<HashSet<_>>();
         let old_bad = *bad;
+
         for missing in proc_macro_deps.difference(&expected) {
             tidy_error!(
                 bad,