Patch Android RISC-V64 support into rustc
Bug: b/276962533
Change-Id: If12eec756f91e0122aa2198040aaa7bc51e02d42
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4827225
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1190889}
NOKEYCHECK=True
GitOrigin-RevId: 605d7dba10b2d0d54dbdb53ecfd3a20c44ff876c
diff --git a/build_rust.py b/build_rust.py
index bfbc05b..3c253d8 100755
--- a/build_rust.py
+++ b/build_rust.py
@@ -722,6 +722,14 @@
if not args.skip_checkout:
CheckoutGitRepo('Rust', RUST_GIT_URL, checkout_revision, RUST_SRC_DIR)
+ # NOTE(b/276962533): We patch in riscv64-linux-android support
+ # (https://github.com/rust-lang/rust/commit/0081d64e4b8413219ddec5d1).
+ # TODO(crbug.com/1472655): Remove this cherrypicking after the
+ # cherrypicked commit is included in the checkout.
+ RunCommand(
+ ('git', '-C', RUST_SRC_DIR, 'cherry-pick',
+ '0081d64e4b8413219ddec5d1013d522edbf132',))
+
path = FetchBetaPackage('cargo', checkout_revision)
if sys.platform == 'win32':
cargo_bin = os.path.join(path, 'cargo', 'bin', 'cargo.exe')
diff --git a/update_rust.py b/update_rust.py
index 7b7044e..6376af4 100755
--- a/update_rust.py
+++ b/update_rust.py
@@ -37,7 +37,7 @@
# this back to its previous value _AND_ set `OVERRIDE_CLANG_REVISION` below
# to the `CLANG_REVISION` that was in place before the roll.
RUST_REVISION = '006a26c0b546abc0fbef59a773639582b641e500'
-RUST_SUB_REVISION = 11
+RUST_SUB_REVISION = 12
# If not None, this overrides the `CLANG_REVISION` in
# //tools/clang/scripts/update.py in order to download a Rust toolchain that