[tor-commits] [tor-browser-build/master] Bug 26250: Bump Rust version to 1.26.1

boklm at torproject.org boklm at torproject.org
Fri Jun 15 20:02:40 UTC 2018


commit 61aac87c00ca7a1da9a1be9f2d181c7841769d4c
Author: Georg Koppen <gk at torproject.org>
Date:   Fri Jun 15 06:12:38 2018 +0000

    Bug 26250: Bump Rust version to 1.26.1
    
    Bumping Rust to 1.26.1 avoids intermittent Firefox compilation failures
    we have seen, similar to those Mozilla got and documented in
    https://bugzilla.mozilla.org/show_bug.cgi?id=1445413.
---
 projects/rust/binaryen.patch | 22 ----------------------
 projects/rust/build          |  9 +--------
 projects/rust/config         |  6 ++----
 projects/rust/unwind.patch   | 34 +++++++++++++++++++---------------
 4 files changed, 22 insertions(+), 49 deletions(-)

diff --git a/projects/rust/binaryen.patch b/projects/rust/binaryen.patch
deleted file mode 100644
index fee9b6a..0000000
--- a/projects/rust/binaryen.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 820f26810baf35c1961763f6b0013e4f7e7380da Mon Sep 17 00:00:00 2001
-From: Georg Koppen <gk at torproject.org>
-Date: Thu, 12 Apr 2018 13:10:13 +0000
-Subject: [PATCH] Use our gcc/c++
-
-
-diff --git a/src/librustc_binaryen/build.rs b/src/librustc_binaryen/build.rs
-index f23ff3cee5..2496dd1be9 100644
---- a/src/librustc_binaryen/build.rs
-+++ b/src/librustc_binaryen/build.rs
-@@ -26,6 +26,8 @@ fn main() {
- 
-     Config::new("../binaryen")
-         .define("BUILD_STATIC_LIB", "ON")
-+        .define("CMAKE_C_COMPILER", "gcc")
-+        .define("CMAKE_CXX_COMPILER", "c++")
-         .build_target("binaryen")
-         .build();
- 
--- 
-2.16.3
-
diff --git a/projects/rust/build b/projects/rust/build
index af0f62b..936f49f 100644
--- a/projects/rust/build
+++ b/projects/rust/build
@@ -52,20 +52,13 @@ mkdir /var/tmp/build
 tar -C /var/tmp/build -xf  [% c('input_files_by_name/rust') %]
 cd /var/tmp/build/rustc-[% c('version') %]-src
 
-[% IF c("var/linux") %]
-  # binaryen hardcodes /usr/bin/cc and /usr/bin/c++ as the C and C++ compiler.
-  # But that is too old on Debian Wheezy which is why we need to patch it, so
-  # we can use our own GCC instead.
-  patch -p1 < $rootdir/binaryen.patch
-[% END %]
-
 [% IF c("var/windows-i686") %]
   # Cross-compiling for Windows 32bit is currently not possible without any
   # patches. The reason for that is libstd expecting DWARF unwinding while most
   # toolchains on Linux, targeting Windows 32bit, use SjLj unwinding.
   # See: https://github.com/rust-lang/rust/issues/12859 for discussion about
   # that and https://github.com/rust-lang/rust/pull/49633 for a newer attempt to
-  # fix this problem. We backport and apply the patch from neersighted.
+  # fix this problem. We apply the patch from neersighted.
   patch -p1 < $rootdir/unwind.patch
 [% END %]
 
diff --git a/projects/rust/config b/projects/rust/config
index 771b50b..b5547f9 100644
--- a/projects/rust/config
+++ b/projects/rust/config
@@ -1,8 +1,8 @@
 # vim: filetype=yaml sw=2
 filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
-version: 1.25.0
+version: 1.26.1
 var:
-  prev_version: 1.24.1
+  prev_version: 1.25.0
   container:
     use_container: 1
 
@@ -71,7 +71,5 @@ input_files:
     sig_ext: asc
     file_gpg_id: 1
     gpg_keyring: rust.gpg
-  - filename: binaryen.patch
-    enable: '[% c("var/linux") %]'
   - filename: unwind.patch
     enable: '[% c("var/windows-i686") %]'
diff --git a/projects/rust/unwind.patch b/projects/rust/unwind.patch
index 8e2e0fc..3a191b9 100644
--- a/projects/rust/unwind.patch
+++ b/projects/rust/unwind.patch
@@ -1,4 +1,4 @@
-From f967c575e502e507ed51b7ed8d1e2a08525e6ae6 Mon Sep 17 00:00:00 2001
+From dd808373aefe6247975455006bbfb89aa6410ed9 Mon Sep 17 00:00:00 2001
 From: Bjorn Neergaard <bjorn at neersighted.com>
 Date: Tue, 3 Apr 2018 19:01:07 -0600
 Subject: [PATCH] Fix cross-compiling i686-pc-windows-gnu from Linux
@@ -32,15 +32,15 @@ rethinking of how iOS is special-cased above, to avoid further
 duplication. Input on how to best structure this file is requested.
 
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index c85b04ddc0..2f58f0d9fa 100644
+index e6aa78fba5..624f2ccfbe 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -145,6 +145,11 @@ pub fn std_cargo(build: &Build,
+@@ -146,6 +146,11 @@ pub fn std_cargo(build: &Builder,
          cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
      }
  
 +    // FIXME: Temporary detection of SJLJ MinGW compilers.
-+    if build.build.contains("linux") && target == "i686-pc-windows-gnu" {
++    if build.build.build.contains("linux") && target == "i686-pc-windows-gnu" {
 +        features.push_str(" sjlj_eh");
 +    }
 +
@@ -48,7 +48,7 @@ index c85b04ddc0..2f58f0d9fa 100644
      // stage0. This works fine if the local rust and being-built rust have the
      // same view of what the default allocator is, but fails otherwise. Since
 diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml
-index c1fe4a89d6..6c8cb330d8 100644
+index 1201759885..a06ef7e0e6 100644
 --- a/src/libstd/Cargo.toml
 +++ b/src/libstd/Cargo.toml
 @@ -49,3 +49,4 @@ force_alloc_system = []
@@ -57,18 +57,19 @@ index c1fe4a89d6..6c8cb330d8 100644
  wasm_syscall = []
 +sjlj_eh = ["unwind/sjlj_eh"]
 diff --git a/src/libunwind/Cargo.toml b/src/libunwind/Cargo.toml
-index fbd9789d2f..5e319c67fa 100644
+index fbd9789d2f..15a20d7ff4 100644
 --- a/src/libunwind/Cargo.toml
 +++ b/src/libunwind/Cargo.toml
-@@ -14,3 +14,6 @@ doc = false
+@@ -14,3 +14,7 @@ doc = false
  [dependencies]
  core = { path = "../libcore" }
  libc = { path = "../rustc/libc_shim" }
 +
 +[features]
 +sjlj_eh = []
++
 diff --git a/src/libunwind/libunwind.rs b/src/libunwind/libunwind.rs
-index e6fff7963f..6a57cf7c93 100644
+index aa73b11fb3..16c21be736 100644
 --- a/src/libunwind/libunwind.rs
 +++ b/src/libunwind/libunwind.rs
 @@ -10,11 +10,6 @@
@@ -83,15 +84,15 @@ index e6fff7963f..6a57cf7c93 100644
  use libc::{c_int, c_void, uintptr_t};
  
  #[repr(C)]
-@@ -84,7 +79,6 @@ pub type _Unwind_Exception_Cleanup_Fn = extern "C" fn(unwind_code: _Unwind_Reaso
-                                                       exception: *mut _Unwind_Exception);
+@@ -85,7 +80,6 @@ pub type _Unwind_Exception_Cleanup_Fn = extern "C" fn(unwind_code: _Unwind_Reaso
  extern "C" {
-     #[unwind]
+     #[cfg_attr(stage0, unwind)]
+     #[cfg_attr(not(stage0), unwind(allowed))]
 -    pub fn _Unwind_Resume(exception: *mut _Unwind_Exception) -> !;
      pub fn _Unwind_DeleteException(exception: *mut _Unwind_Exception);
      pub fn _Unwind_GetLanguageSpecificData(ctx: *mut _Unwind_Context) -> *mut c_void;
      pub fn _Unwind_GetRegionStart(ctx: *mut _Unwind_Context) -> _Unwind_Ptr;
-@@ -216,26 +210,49 @@ if #[cfg(all(any(target_os = "ios", not(target_arch = "arm"))))] {
+@@ -217,28 +211,52 @@ if #[cfg(all(any(target_os = "ios", not(target_arch = "arm"))))] {
          pc
      }
  }
@@ -103,7 +104,8 @@ index e6fff7963f..6a57cf7c93 100644
 +if #[cfg(all(target_os = "ios", target_arch = "arm"))] {
 +    // 32-bit iOS uses SjLj and does not provide _Unwind_Backtrace()
      extern "C" {
-         #[unwind]
+         #[cfg_attr(stage0, unwind)]
+         #[cfg_attr(not(stage0), unwind(allowed))]
 -        pub fn _Unwind_RaiseException(exception: *mut _Unwind_Exception) -> _Unwind_Reason_Code;
 -        pub fn _Unwind_Backtrace(trace: _Unwind_Trace_Fn,
 -                                 trace_argument: *mut c_void)
@@ -121,7 +123,8 @@ index e6fff7963f..6a57cf7c93 100644
 +
 +} else if #[cfg(feature = "sjlj_eh")] {
      extern "C" {
-         #[unwind]
+         #[cfg_attr(stage0, unwind)]
+         #[cfg_attr(not(stage0), unwind(allowed))]
 +        pub fn _Unwind_SjLj_Resume(e: *mut _Unwind_Exception) -> !;
          pub fn _Unwind_SjLj_RaiseException(e: *mut _Unwind_Exception) -> _Unwind_Reason_Code;
 +        pub fn _Unwind_Backtrace(trace: _Unwind_Trace_Fn,
@@ -140,7 +143,8 @@ index e6fff7963f..6a57cf7c93 100644
      }
 +} else {
 +    extern "C" {
-+        #[unwind]
++        #[cfg_attr(stage0, unwind)]
++        #[cfg_attr(not(stage0), unwind(allowed))]
 +        pub fn _Unwind_Resume(exception: *mut _Unwind_Exception) -> !;
 +        pub fn _Unwind_RaiseException(exception: *mut _Unwind_Exception) -> _Unwind_Reason_Code;
 +        pub fn _Unwind_Backtrace(trace: _Unwind_Trace_Fn,





More information about the tor-commits mailing list