Bug 1778604 - Switch rust-dev to "stable" rust. r=firefox-build-system-reviewers,andi

Sanitizer builds require unstable features from the rust compiler, and
the common way to achieve this is to use a nightly rust compiler,
which we had been doing for a while.

Later on, we also needed to use unstable features that actually require
some patches to both rustc and cargo to work properly for our needs, so
we switched to taking the source of a nightly rust compiler, patch and
build it, and use that.

But finding an appropriate nightly rust compiler is not always easy. We
want something close enough from the stable rust compiler we're using
otherwise, which we've been using the first nightly that has the
following version number for. But it also can happen that those versions
have bugs that have been fixed later and then uplifted during the beta
period (and thus fixed in the stable rust compiler).

On the other hand, taking the source of the stable rust compiler and
compiling it with a `channel` set to `dev` (actually the default) or
`nightly` yields a compiler that is very close to the actual stable rust
compiler, but acts like a nightly compiler and allows to enable unstable
features.

So instead of trying to pick a good version from the nightly channel,
just use the same version as the stable rust version we use.

Differential Revision: https://phabricator.services.mozilla.com/D151341
This commit is contained in:
Mike Hommey 2022-07-08 08:19:07 +00:00
Родитель 68050fbe08
Коммит a753b3db0b
2 изменённых файлов: 7 добавлений и 14 удалений

Просмотреть файл

@ -362,23 +362,16 @@ clang-trunk:
repo: https://github.com/llvm/llvm-project
branch: main
# This revision currently corresponds to rust nightly-2022-05-21,
# which is the first nightly with the version 1.63.0 with a fix
# for https://github.com/rust-lang/rust/issues/97205,
# so it should be as close as possible to the behaviour of
# stable-1.62.0.
#
# We use this to build from source, so the resulting non-official
# 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.63.0-dev:
description: Rust 1.63.0-dev source code
# We build stable rust from source so the resulting compiler acts as a nightly
# rust compiler, allowing to use unstable features like -Zbuild-std and
# sanitizers.
rust-1.62.0:
description: Rust 1.62.0 source code
fetch:
type: git
include-dot-git: true
repo: https://github.com/rust-lang/rust/
revision: e6a4afc3af2d2a53f91fc8a77bdfe94bea375b29
revision: a8314ef7d0ec7b75c336af2c9857bfaf43002bfc
wasi-sdk:
description: wasi-sdk-16 source code

Просмотреть файл

@ -86,7 +86,7 @@ linux64-rust-dev:
]
fetches:
fetch:
- rust-1.63.0-dev
- rust-1.62.0
toolchain:
- linux64-clang-toolchain
- linux64-binutils