Skip to content

Commit ee5eed4

Browse files
danakjAravind Vasudevan
authored andcommitted
Fix update_rust when there's no fallback
The version is a combination of the rust version and clang version concat'd together. Bug: 1409334 Change-Id: Iac89e4f50b42fb18d4988e091f94535795cfc38c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4188796 Reviewed-by: Adrian Taylor <[email protected]> Commit-Queue: danakj <[email protected]> Cr-Commit-Position: refs/heads/main@{#1095645} NOKEYCHECK=True GitOrigin-RevId: ad0573e0592046e182166a123f297ef65d0862a0
1 parent 5d3c0f9 commit ee5eed4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

update_rust.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,19 @@
7575

7676

7777
# Package version built in build_rust.py, which is always built against the
78-
# latest Clang and never uses the FALLBACK_CLANG_VERSION.
78+
# current Clang. Typically Clang and Rust revisions are both updated together
79+
# and this picks the Clang that has just been built.
7980
def GetPackageVersionForBuild():
8081
from update import (CLANG_REVISION, CLANG_SUB_REVISION)
81-
return GetPackageVersion(f'{CLANG_REVISION}-{CLANG_SUB_REVISION}')
82+
return (f'{RUST_REVISION}-{RUST_SUB_REVISION}'
83+
'-{CLANG_REVISION}-{CLANG_SUB_REVISION}')
8284

8385

84-
# Package version for download, which may differ from GetUploadPackageVersion()
85-
# if FALLBACK_CLANG_VERSION is set.
86+
# Package version for download. Ideally this is the latest Clang+Rust roll,
87+
# which was built successfully and is returned from GetPackageVersionForBuild().
88+
# However at this time Clang rolls even if Rust fails to build, so we have Rust
89+
# pinned to the last known successful build with FALLBACK_REVISION. This should
90+
# go away once we block Clang rolls on Rust also being built.
8691
def GetDownloadPackageVersion():
8792
return FALLBACK_REVISION \
8893
if FALLBACK_REVISION else GetPackageVersionForBuild()

0 commit comments

Comments
 (0)