diff --git a/build/build-rust/cargo-vendor-std.patch b/build/build-rust/cargo-vendor-std.patch index 7185075e7d72..d4c69a3688a7 100644 --- a/build/build-rust/cargo-vendor-std.patch +++ b/build/build-rust/cargo-vendor-std.patch @@ -9,20 +9,20 @@ Most of these changes just add/edit tests for the functionality. Only the change to src/cargo/core/compiler/standard_lib.rs is important. diff --git a/src/cargo/core/compiler/standard_lib.rs b/src/cargo/core/compiler/standard_lib.rs -index 0b14df805..7bc5151a4 100644 +index e0baebd51..547b84147 100644 --- a/src/cargo/core/compiler/standard_lib.rs +++ b/src/cargo/core/compiler/standard_lib.rs -@@ -11,6 +11,7 @@ use crate::ops::{self, Packages}; - use crate::util::errors::CargoResult; +@@ -12,6 +12,7 @@ use crate::util::errors::CargoResult; + use crate::Config; use std::collections::{HashMap, HashSet}; use std::env; +use std::fs; use std::path::PathBuf; - /// Parse the `-Zbuild-std` flag. -@@ -39,27 +40,45 @@ pub fn resolve_std<'cfg>( - crates: &[String], - ) -> CargoResult<(PackageSet<'cfg>, Resolve, ResolvedFeatures)> { + use super::BuildConfig; +@@ -74,27 +75,45 @@ pub fn resolve_std<'cfg>( + } + let src_path = detect_sysroot_src_path(target_data)?; - let to_patch = [ - "rustc-std-workspace-core", @@ -254,7 +254,7 @@ index 000000000..4465a08a8 +this file shouldn't be read \ No newline at end of file diff --git a/tests/testsuite/standard_lib.rs b/tests/testsuite/standard_lib.rs -index b0d42b38d..3bbc49db7 100644 +index 07b038b4a..6393b9ece 100644 --- a/tests/testsuite/standard_lib.rs +++ b/tests/testsuite/standard_lib.rs @@ -27,71 +27,18 @@ fn setup() -> Option { diff --git a/build/build-rust/rust-vendor-std.patch b/build/build-rust/rust-vendor-std.patch index 8e842a566cc3..6757e422cf5f 100644 --- a/build/build-rust/rust-vendor-std.patch +++ b/build/build-rust/rust-vendor-std.patch @@ -12,10 +12,10 @@ For firefox's purposes, these patches still work fine, and are necessary to make -Zbuild-std work in a vendored environment. diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs -index 802b5c99500..438b76a472b 100644 +index 6181a611ec3..8d99c148dcf 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs -@@ -847,6 +847,30 @@ fn run(self, builder: &Builder<'_>) -> GeneratedTarball { +@@ -824,6 +824,30 @@ fn run(self, builder: &Builder<'_>) -> GeneratedTarball { builder.copy(&builder.src.join(file), &dst_src.join(file)); } @@ -47,11 +47,11 @@ index 802b5c99500..438b76a472b 100644 } } diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs -index 88fdcfa2d43..293324c17af 100644 +index a4e35bf6d47..cd5e478bed0 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs -@@ -1179,6 +1179,27 @@ fn read_stamp_file(&self, stamp: &Path) -> Vec<(PathBuf, DependencyType)> { - paths +@@ -1418,6 +1418,27 @@ fn tempdir(&self) -> PathBuf { + tmp } + /// Copies a file from `src` to `dst` and doesn't use links, so diff --git a/docs/writing-rust-code/update-policy.md b/docs/writing-rust-code/update-policy.md index faa0d641edc7..7ecdee9b0c87 100644 --- a/docs/writing-rust-code/update-policy.md +++ b/docs/writing-rust-code/update-policy.md @@ -66,8 +66,8 @@ Here are the Rust versions for each Firefox version. | Firefox 100 | Rust 1.59.0 | 1.57.0 | 2022 February 24 | 2022 March 31 | 2022 May 3 | Firefox 101 | Rust 1.60.0 | 1.59.0 | 2022 April 7 | 2022 April 28 | 2022 May 31 | Firefox 102 | Rust 1.60.0 | 1.59.0 | 2022 April 7 | 2022 May 26 | 2022 June 28 +| Firefox 103 | Rust 1.61.0 | 1.59.0 | 2022 May 19 | 2022 June 23 | 2022 July 27 | **Estimated** | -| Firefox 103 | Rust 1.61.0 | ? | 2022 May 19 | 2022 June 23 | 2022 July 27 | Firefox 104 | Rust 1.62.0 | ? | 2022 June 30 | 2022 July 21 | 2022 August 23 | Firefox 105 | Rust 1.63.0 | ? | 2022 August 11 | 2022 August 18 | 2022 September 20 | Firefox 106 | Rust 1.63.0 | ? | 2022 August 11 | 2022 September 15 | 2022 October 18 diff --git a/mozglue/static/rust/build.rs b/mozglue/static/rust/build.rs index 84675d0e829e..2ab72ff8f6a1 100644 --- a/mozglue/static/rust/build.rs +++ b/mozglue/static/rust/build.rs @@ -16,7 +16,7 @@ fn main() { println!("cargo:rerun-if-changed=wrappers.cpp"); let ver = version().unwrap(); - let max_oom_hook_version = Version::parse("1.63.0-alpha").unwrap(); + let max_oom_hook_version = Version::parse("1.64.0-alpha").unwrap(); if ver < max_oom_hook_version { println!("cargo:rustc-cfg=feature=\"oom_with_hook\""); diff --git a/taskcluster/ci/fetch/toolchains.yml b/taskcluster/ci/fetch/toolchains.yml index 8498b31dbaf6..a8c8a0e79051 100644 --- a/taskcluster/ci/fetch/toolchains.yml +++ b/taskcluster/ci/fetch/toolchains.yml @@ -362,22 +362,22 @@ clang-trunk: repo: https://github.com/llvm/llvm-project branch: main -# This revision currently corresponds to rust nightly-2022-04-05, -# which is the first nightly with the version 1.62.0, +# This revision currently corresponds to rust nightly-2022-05-16, +# which is the first nightly with the version 1.63.0, # so it should be as close as possible to the behaviour of -# stable-1.61.0. +# stable-1.62.0. # # We use this to build from source, so the resulting non-official -# artifacts will report their version as "1.62.0-dev", but will otherwise +# artifacts will report their version as "1.63.0-dev", but will otherwise # behave like a nightly build. This means they will allow you to use # unstable features like -Zbuild-std and sanitizers. -rust-1.62.0-dev: - description: Rust 1.62.0-dev source code +rust-1.63.0-dev: + description: Rust 1.63.0-dev source code fetch: type: git include-dot-git: true repo: https://github.com/rust-lang/rust/ - revision: 60e50fc1cfe0bb693a5f4f93eb83ef70854531e3 + revision: 42e1761c704f074b7b8c7ff8a7433acfd65d2ee9 wasi-sdk: description: wasi-sdk-16 source code diff --git a/taskcluster/ci/toolchain/rust.yml b/taskcluster/ci/toolchain/rust.yml index 1ab21648b669..764f90d0be34 100644 --- a/taskcluster/ci/toolchain/rust.yml +++ b/taskcluster/ci/toolchain/rust.yml @@ -40,7 +40,7 @@ linux64-rust-1.59: linux64-rust-1.61: treeherder: - symbol: TL(rust) + symbol: TL(rust-1.61) run: arguments: [ '--channel', '1.61.0', @@ -50,6 +50,19 @@ linux64-rust-1.61: '--target', 'aarch64-unknown-linux-gnu', '--target', 'wasm32-wasi', ] + +linux64-rust-1.62: + treeherder: + symbol: TL(rust) + run: + arguments: [ + '--channel', '1.62.0', + '--host', 'x86_64-unknown-linux-gnu', + '--target', 'x86_64-unknown-linux-gnu', + '--target', 'i686-unknown-linux-gnu', + '--target', 'aarch64-unknown-linux-gnu', + '--target', 'wasm32-wasi', + ] toolchain-alias: linux64-rust # A patched rust toolchain that allows us to use sanitizers in our vendored @@ -69,19 +82,19 @@ linux64-rust-dev: ] fetches: fetch: - - rust-1.62.0-dev + - rust-1.63.0-dev toolchain: - linux64-clang-toolchain - linux64-binutils -linux64-rust-cross-1.61: +linux64-rust-cross-1.62: description: "rust repack with macos and windows cross support" treeherder: symbol: TL(rust-cross) run: arguments: [ - '--channel', '1.61.0', + '--channel', '1.62.0', '--host', 'x86_64-unknown-linux-gnu', '--target', 'x86_64-unknown-linux-gnu', '--target', 'i686-unknown-linux-gnu', @@ -98,13 +111,13 @@ linux64-rust-cross-1.61: ] toolchain-alias: linux64-rust-cross -linux64-rust-static-1.61: +linux64-rust-static-1.62: description: "rust repack with static linking support" treeherder: symbol: TL(rust-static) run: arguments: [ - '--channel', '1.61.0', + '--channel', '1.62.0', '--host', 'x86_64-unknown-linux-gnu', '--target', 'x86_64-unknown-linux-gnu', '--target', 'x86_64-unknown-linux-musl', @@ -139,15 +152,28 @@ linux64-rust-macos-1.61: '--target', 'x86_64-apple-darwin', '--target', 'aarch64-apple-darwin', ] + +linux64-rust-macos-1.62: + description: "rust repack with macos-cross support" + treeherder: + symbol: TL(rust-macos-1.62) + run: + arguments: [ + '--channel', '1.62.0', + '--host', 'x86_64-unknown-linux-gnu', + '--target', 'x86_64-unknown-linux-gnu', + '--target', 'x86_64-apple-darwin', + '--target', 'aarch64-apple-darwin', + ] toolchain-alias: linux64-rust-macos -linux64-rust-android-1.61: +linux64-rust-android-1.62: description: "rust repack with android-cross support" treeherder: symbol: TL(rust-android) run: arguments: [ - '--channel', '1.61.0', + '--channel', '1.62.0', '--host', 'x86_64-unknown-linux-gnu', '--target', 'x86_64-unknown-linux-gnu', '--target', 'armv7-linux-androideabi', @@ -175,7 +201,7 @@ linux64-rust-windows-1.57: linux64-rust-windows-1.61: description: "rust repack with windows-cross support" treeherder: - symbol: TL(rust-win) + symbol: TL(rust-win-1.61) run: arguments: [ '--channel', '1.61.0', @@ -184,6 +210,19 @@ linux64-rust-windows-1.61: '--target', 'x86_64-pc-windows-msvc', '--target', 'i686-pc-windows-msvc', ] + +linux64-rust-windows-1.62: + description: "rust repack with windows-cross support" + treeherder: + symbol: TL(rust-win) + run: + arguments: [ + '--channel', '1.62.0', + '--host', 'x86_64-unknown-linux-gnu', + '--target', 'x86_64-unknown-linux-gnu', + '--target', 'x86_64-pc-windows-msvc', + '--target', 'i686-pc-windows-msvc', + ] toolchain-alias: linux64-rust-windows win64-rust-1.57: @@ -199,12 +238,12 @@ win64-rust-1.57: ] toolchain-alias: win64-rust-toolchain -win64-rust-1.61: +win64-rust-1.62: treeherder: symbol: TW64(rust) run: arguments: [ - '--channel', '1.61.0', + '--channel', '1.62.0', '--host', 'x86_64-pc-windows-msvc', '--target', 'x86_64-pc-windows-msvc', '--target', 'i686-pc-windows-msvc', @@ -212,23 +251,23 @@ win64-rust-1.61: ] toolchain-alias: win64-rust -macosx64-rust-1.61: +macosx64-rust-1.62: treeherder: symbol: TM(rust) run: arguments: [ - '--channel', '1.61.0', + '--channel', '1.62.0', '--host', 'x86_64-apple-darwin', '--target', 'x86_64-apple-darwin', ] toolchain-alias: macosx64-rust -mingw32-rust-1.61: +mingw32-rust-1.62: treeherder: symbol: TMW(rust) run: arguments: [ - '--channel', '1.61.0', + '--channel', '1.62.0', '--host', 'x86_64-unknown-linux-gnu', '--target', 'i686-unknown-linux-gnu', '--target', 'i686-pc-windows-gnu',