[tbb-commits] [tor-browser-build/maint-10.5] Bug 40332: Update rust to 1.53.0

sysrqb at torproject.org sysrqb at torproject.org
Tue Aug 17 14:15:01 UTC 2021


commit 1c8682e16daa07f51f271f3e42f3af9bbb672500
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Thu Jul 8 16:49:11 2021 +0200

    Bug 40332: Update rust to 1.53.0
---
 projects/rust/build                  |  7 +++
 projects/rust/config                 |  9 +++-
 projects/rust/fix-build-1.53.0.patch | 88 ++++++++++++++++++++++++++++++++++++
 3 files changed, 102 insertions(+), 2 deletions(-)

diff --git a/projects/rust/build b/projects/rust/build
index d4061eb..3d68e61 100644
--- a/projects/rust/build
+++ b/projects/rust/build
@@ -46,6 +46,13 @@ cd /var/tmp/build/rustc-[% c('version') %]-src
   cd src/llvm-project
   patch -p1 < $rootdir/[% c('input_files_by_name/43909') %]
   cd ../../
+[% ELSE -%]
+  # Patches for fixing:
+  #  https://github.com/rust-lang/rust/issues/86436
+  #  https://github.com/rust-lang/rust/pull/86568
+  #  https://github.com/rust-lang/rust/issues/86999
+  # This can be removed when updating to >= 1.54.0.
+  patch -p1 < $rootdir/fix-build-1.53.0.patch
 [% END %]
 
 [% IF c("var/windows-i686") %]
diff --git a/projects/rust/config b/projects/rust/config
index 05d33b2..55bf544 100644
--- a/projects/rust/config
+++ b/projects/rust/config
@@ -11,8 +11,8 @@ var:
 targets:
   ff91esr:
     var:
-      current_version: 1.52.0
-      previous_version: 1.51.0
+      current_version: 1.53.0
+      previous_version: 1.52.0
   android:
     var:
       arch_deps:
@@ -101,3 +101,8 @@ input_files:
   - filename: 43909.patch
     name: 43909
     enable: '[% ! c("var/ff91esr") %]'
+
+    # Fix for https://github.com/rust-lang/rust/issues/86436
+    # Taken from https://github.com/rust-lang/rust/pull/86568 (merged it 1.54.0)
+  - filename: fix-build-1.53.0.patch
+    enable: '[% c("var/ff91esr") %]'
diff --git a/projects/rust/fix-build-1.53.0.patch b/projects/rust/fix-build-1.53.0.patch
new file mode 100644
index 0000000..4b4f092
--- /dev/null
+++ b/projects/rust/fix-build-1.53.0.patch
@@ -0,0 +1,88 @@
+commit 601d24810e89efd42f7cd69d4a7ccecd4e35364d
+Author: Eric Huss <eric at huss.org>
+Date:   Tue Jun 22 22:10:25 2021 -0700
+
+    Don't dist miri on stable or beta.
+
+diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
+index 71ed0af4a7c..e0c33f73577 100644
+--- a/src/bootstrap/dist.rs
++++ b/src/bootstrap/dist.rs
+@@ -1171,6 +1171,9 @@ impl Step for Miri {
+     }
+ 
+     fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
++        if !builder.build.unstable_features() {
++            return None;
++        }
+         let compiler = self.compiler;
+         let target = self.target;
+         assert!(builder.config.extended);
+
+
+commit 6aa79a34d87252deaae11e75663e5740a22f14ea
+Author: Eric Huss <eric at huss.org>
+Date:   Wed Jun 23 07:03:42 2021 -0700
+
+    Comment and include rust-analyzer.
+
+diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
+index e0c33f73577..19895baf08f 100644
+--- a/src/bootstrap/dist.rs
++++ b/src/bootstrap/dist.rs
+@@ -1072,6 +1072,12 @@ impl Step for RustAnalyzer {
+     }
+ 
+     fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
++        // This prevents rust-analyzer from being built for "dist" or "install"
++        // on the stable/beta channels. It is a nightly-only tool and should
++        // not be included.
++        if !builder.build.unstable_features() {
++            return None;
++        }
+         let compiler = self.compiler;
+         let target = self.target;
+         assert!(builder.config.extended);
+@@ -1171,6 +1177,9 @@ impl Step for Miri {
+     }
+ 
+     fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
++        // This prevents miri from being built for "dist" or "install"
++        // on the stable/beta channels. It is a nightly-only tool and should
++        // not be included.
+         if !builder.build.unstable_features() {
+             return None;
+         }
+
+
+   Disable rust-analyzer
+
+diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
+index cff1ec843ff..3767b0387a0 100644
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -482,7 +482,6 @@ impl<'a> Builder<'a> {
+                 install::Std,
+                 install::Cargo,
+                 install::Rls,
+-                install::RustAnalyzer,
+                 install::Rustfmt,
+                 install::RustDemangler,
+                 install::Clippy,
+diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
+index 13ee909afd5..a38fc9e95eb 100644
+--- a/src/bootstrap/install.rs
++++ b/src/bootstrap/install.rs
+@@ -164,12 +164,6 @@ install!((self, builder, _config),
+             );
+         }
+     };
+-    RustAnalyzer, "rust-analyzer", Self::should_build(_config), only_hosts: true, {
+-        let tarball = builder
+-            .ensure(dist::RustAnalyzer { compiler: self.compiler, target: self.target })
+-            .expect("missing rust-analyzer");
+-        install_sh(builder, "rust-analyzer", self.compiler.stage, Some(self.target), &tarball);
+-    };
+     Clippy, "clippy", Self::should_build(_config), only_hosts: true, {
+         let tarball = builder.ensure(dist::Clippy { compiler: self.compiler, target: self.target });
+         install_sh(builder, "clippy", self.compiler.stage, Some(self.target), &tarball);





More information about the tbb-commits mailing list