git: e81f8fe1e2ff - main - devel/electron35: fix build with rust 1.90

From: Hiroki Tagato <tagattie_at_FreeBSD.org>
Date: Sun, 05 Oct 2025 09:15:37 UTC
The branch main has been updated by tagattie:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e81f8fe1e2ffc074df73cb52a9a588a00a824f7e

commit e81f8fe1e2ffc074df73cb52a9a588a00a824f7e
Author:     Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2025-10-05 09:14:08 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2025-10-05 09:14:08 +0000

    devel/electron35: fix build with rust 1.90
    
    PR:             290009
    Reported by:    diizzy
    Obtained from:  https://cgit.freebsd.org/ports/commit/?id=a448aeb00153c3465a30ff41ecf43f8896a50d52
---
 devel/electron35/files/patch-build_rust_allocator_lib.rs | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/devel/electron35/files/patch-build_rust_allocator_lib.rs b/devel/electron35/files/patch-build_rust_allocator_lib.rs
index 90c48fdb94cc..1b729935658d 100644
--- a/devel/electron35/files/patch-build_rust_allocator_lib.rs
+++ b/devel/electron35/files/patch-build_rust_allocator_lib.rs
@@ -1,6 +1,6 @@
---- build/rust/allocator/lib.rs.orig	2025-08-26 21:24:10 UTC
+--- build/rust/allocator/lib.rs.orig	2025-10-04 21:11:42 UTC
 +++ build/rust/allocator/lib.rs
-@@ -0,0 +1,125 @@
+@@ -0,0 +1,132 @@
 +// Copyright 2025 The Chromium Authors
 +// Use of this source code is governed by a BSD-style license that can be
 +// found in the LICENSE file.
@@ -102,7 +102,14 @@
 +    #[linkage = "weak"]
 +    static __rust_no_alloc_shim_is_unstable: u8 = 0;
 +
++    #[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"]