Skip to content

Commit 5d3c0f9

Browse files
danakjAravind Vasudevan
authored andcommitted
Override the full Rust+Clang version in FALLBACK_REVISION
The fallback mechanism was designed for when we were rolling Rust separately from Clang. As such, the Rust revision would never bump until we had a successful build. Now we are rolling Rust and Clang together, but we're not yet blocking the Clang roll on Rust succeeding. This means the Rust revision changes but doesn't refer to a successful build. Then the fallback revision tries to use it and can't find the toolchain. Until we block the Clang roll on Rust, have the rust fallback path specify and pin to the full Rust + Clang versions. Bug: 1409334 Change-Id: I51aa792ab3a5349fae94e04becd23b9d0b344f7a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4186736 Auto-Submit: danakj <[email protected]> Reviewed-by: Adrian Taylor <[email protected]> Commit-Queue: Adrian Taylor <[email protected]> Cr-Commit-Position: refs/heads/main@{#1095496} NOKEYCHECK=True GitOrigin-RevId: 7ba24de9daf83eca666514391f17176f84f0133b
1 parent b0fcd0c commit 5d3c0f9

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

update_rust.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,16 @@
5151
#
5252
# This should almost always be None. When a breakage happens the fallback should
5353
# be temporary. Once fixed, the applicable revision(s) above should be updated
54-
# and FALLBACK_CLANG_VERSION should be reset to None.
54+
# and FALLBACK_REVISION should be reset to None.
5555
#
5656
# Rust builds (for Linux) that worked are found at:
5757
# https://commondatastorage.googleapis.com/chromium-browser-clang/index.html?path=Linux_x64/rust-toolchain-
5858
# The latest builds are prefixed with a date, such as `20230101-1`.
59-
FALLBACK_CLANG_VERSION = 'llvmorg-16-init-13328-g110fe4f4-1'
59+
#
60+
# TODO(lukasza): Include CRUBIT_REVISION and CRUBIT_SUB_REVISION once we
61+
# include Crubit binaries in the generated package. See also a TODO comment
62+
# in BuildCrubit in package_rust.py.
63+
FALLBACK_REVISION = '20221209-1-llvmorg-16-init-13328-g110fe4f4-1'
6064

6165
# Hash of src/stage0.json, which itself contains the stage0 toolchain hashes.
6266
# We trust the Rust build system checks, but to ensure it is not tampered with
@@ -70,15 +74,6 @@
7074
VERSION_STAMP_PATH = os.path.join(RUST_TOOLCHAIN_OUT_DIR, 'VERSION')
7175

7276

73-
# Get the package version for the RUST_[SUB_]REVISION above with the specified
74-
# clang_version.
75-
def GetPackageVersion(clang_version):
76-
# TODO(lukasza): Include CRUBIT_REVISION and CRUBIT_SUB_REVISION once we
77-
# include Crubit binaries in the generated package. See also a TODO comment
78-
# in BuildCrubit in package_rust.py.
79-
return f'{RUST_REVISION}-{RUST_SUB_REVISION}-{clang_version}'
80-
81-
8277
# Package version built in build_rust.py, which is always built against the
8378
# latest Clang and never uses the FALLBACK_CLANG_VERSION.
8479
def GetPackageVersionForBuild():
@@ -89,10 +84,8 @@ def GetPackageVersionForBuild():
8984
# Package version for download, which may differ from GetUploadPackageVersion()
9085
# if FALLBACK_CLANG_VERSION is set.
9186
def GetDownloadPackageVersion():
92-
if FALLBACK_CLANG_VERSION:
93-
return GetPackageVersion(FALLBACK_CLANG_VERSION)
94-
else:
95-
return GetPackageVersionForBuild()
87+
return FALLBACK_REVISION \
88+
if FALLBACK_REVISION else GetPackageVersionForBuild()
9689

9790

9891
# Get the version of the toolchain package we already have.

0 commit comments

Comments
 (0)