diff options
Diffstat (limited to 'www/ungoogled-chromium/files/patch-build_rust_allocator_lib.rs')
-rw-r--r-- | www/ungoogled-chromium/files/patch-build_rust_allocator_lib.rs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/www/ungoogled-chromium/files/patch-build_rust_allocator_lib.rs b/www/ungoogled-chromium/files/patch-build_rust_allocator_lib.rs index 0a97b7685343..cfb992f08880 100644 --- a/www/ungoogled-chromium/files/patch-build_rust_allocator_lib.rs +++ b/www/ungoogled-chromium/files/patch-build_rust_allocator_lib.rs @@ -13,3 +13,47 @@ // Mangle the symbol name as rustc expects. #[rustc_std_internal_symbol] #[allow(non_upper_case_globals)] +https://issues.chromium.org/issues/440481922 +https://chromium-review.googlesource.com/c/chromium/src/+/6875644 + + +From 23d818d3c7fba4658248f17fd7b8993199242aa9 Mon Sep 17 00:00:00 2001 +From: Hans Wennborg <hans@chromium.org> +Date: Fri, 22 Aug 2025 10:34:47 -0700 +Subject: [PATCH] [rust] Define __rust_alloc_error_handler_should_panic_v2 + +https://github.com/rust-lang/rust/pull/143387 made +__rust_alloc_error_handler_should_panic a function. + +The new definition is needed when rolling Rust past that PR. We can +remove the old symbol afterwards. + +Bug: 440481922 +Change-Id: I3340edd6d96d76de14942af67939978140430424 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6875644 +Commit-Queue: Arthur Eubanks <aeubanks@google.com> +Reviewed-by: Arthur Eubanks <aeubanks@google.com> +Auto-Submit: Hans Wennborg <hans@chromium.org> +Commit-Queue: Hans Wennborg <hans@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1505162} +--- + +diff --git a/build/rust/allocator/lib.rs b/build/rust/allocator/lib.rs +index 29b3af1..a7fa7a4 100644 +--- build/rust/allocator/lib.rs ++++ build/rust/allocator/lib.rs +@@ -90,7 +90,14 @@ + #[linkage = "weak"] + fn __rust_no_alloc_shim_is_unstable_v2() {} + ++ #[rustc_std_internal_symbol] ++ #[linkage = "weak"] ++ fn __rust_alloc_error_handler_should_panic_v2() -> u8 { ++ 0 ++ } ++ + // Mangle the symbol name as rustc expects. ++ // TODO(crbug.com/440481922): Remove this after rolling past https://github.com/rust-lang/rust/pull/143387 + #[rustc_std_internal_symbol] + #[allow(non_upper_case_globals)] + #[linkage = "weak"] |