You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using unstable features creates risk for our ability to roll the
compiler, and are not supported at all in other toolchains like
Cronet.
Build scripts sometimes compile rust code as a way to query the
compiler, as is seen with the anyhow crate. It compiles code to test
for the presence of an unstable feature. We need to tell the build
script the rustflags to use when compiling, or it will not know about
the `-Zallow-features=` flag, and will incorrectly try to enable the
unstable feature. We can do this through the `CARGO_ENCODED_RUSTFLAGS`
environment variable. To get this variable to the build script we
write `{{rustflags}}` to a file. This avoids the need to try
differentiate rust flags from python flags in the command line for
run_build_script.py.
The stdlib gets to use unstable features still, by design, as its part
of the toolchain itself, but the rest of our code should not.
The mojo experimental code has an exception to this, but it's not
blocking code. If it becomes a problem, we can disable it from the
build.
R=aeubanks@google.com, lukasza@chromium.org
Change-Id: I34fd5d36cccc6327f68821f5cfb8db2773544110
Cq-Include-Trybots: luci.chromium.try:android-rust-arm32-rel,android-rust-arm64-dbg,android-rust-arm64-rel,linux-rust-x64-dbg,linux-rust-x64-rel,mac-rust-x64-dbg,win-rust-x64-dbg,win-rust-x64-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5967012
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Arthur Eubanks <aeubanks@google.com>
Cr-Commit-Position: refs/heads/main@{#1375330}
CrOS-Libchrome-Original-Commit: 6fdddfa2d8492bc0f1bb9055b41f1bae387cb862
0 commit comments