Skip to content

Commit 774f8c5

Browse files
committed
chromium: Backport a patch for rust 1.90
Signed-off-by: Zoltán Böszörményi <[email protected]>
1 parent 9937b22 commit 774f8c5

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

meta-chromium/recipes-browser/chromium/chromium-gn.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ SRC_URI += "\
2626
file://0010-Don-t-require-profiler_builtins.rlib.patch \
2727
file://0011-fix-check_version-Only-compare-node.js-major-version.patch \
2828
file://0012-chromium-fix-v4l2-compiler-error-on-arm.patch \
29+
file://23d818d3c7fba4658248f17fd7b8993199242aa9.patch \
2930
"
3031

3132
# ARM/AArch64-specific patches.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 23d818d3c7fba4658248f17fd7b8993199242aa9 Mon Sep 17 00:00:00 2001
2+
From: Hans Wennborg <[email protected]>
3+
Date: Fri, 22 Aug 2025 10:34:47 -0700
4+
Subject: [PATCH] [rust] Define __rust_alloc_error_handler_should_panic_v2
5+
6+
https://github.com/rust-lang/rust/pull/143387 made
7+
__rust_alloc_error_handler_should_panic a function.
8+
9+
The new definition is needed when rolling Rust past that PR. We can
10+
remove the old symbol afterwards.
11+
12+
Bug: 440481922
13+
Change-Id: I3340edd6d96d76de14942af67939978140430424
14+
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6875644
15+
Commit-Queue: Arthur Eubanks <[email protected]>
16+
Reviewed-by: Arthur Eubanks <[email protected]>
17+
Auto-Submit: Hans Wennborg <[email protected]>
18+
Commit-Queue: Hans Wennborg <[email protected]>
19+
Cr-Commit-Position: refs/heads/main@{#1505162}
20+
21+
Upstream-Status: Backport [https://chromiumdash.appspot.com/commit/23d818d3c7fba4658248f17fd7b8993199242aa9]
22+
---
23+
build/rust/allocator/lib.rs | 7 +++++++
24+
1 file changed, 7 insertions(+)
25+
26+
diff --git a/build/rust/allocator/lib.rs b/build/rust/allocator/lib.rs
27+
index 29b3af1274fb36..a7fa7a470f0001 100644
28+
--- a/build/rust/allocator/lib.rs
29+
+++ b/build/rust/allocator/lib.rs
30+
@@ -90,7 +90,14 @@ mod both_allocators {
31+
#[linkage = "weak"]
32+
fn __rust_no_alloc_shim_is_unstable_v2() {}
33+
34+
+ #[rustc_std_internal_symbol]
35+
+ #[linkage = "weak"]
36+
+ fn __rust_alloc_error_handler_should_panic_v2() -> u8 {
37+
+ 0
38+
+ }
39+
+
40+
// Mangle the symbol name as rustc expects.
41+
+ // TODO(crbug.com/440481922): Remove this after rolling past https://github.com/rust-lang/rust/pull/143387
42+
#[rustc_std_internal_symbol]
43+
#[allow(non_upper_case_globals)]
44+
#[linkage = "weak"]

0 commit comments

Comments
 (0)