Skip to content

Commit 301eb30

Browse files
committed
chromium: [PATCH] Revert "Set Rust symbol visibility to hidden when ..."
This reverts chromium commit ee3900fd57b3c580aefff15c64052904d81b7760. * Change-Id: https://crrev.com/c/5966273 Fixes the following compilation error: ``` | FAILED: obj/third_party/rust/ryu/v1/lib/libryu_lib.rlib [...] | error: unknown unstable option: `default-visibility` ``` This patch will be dropped once Rust >= 1.83 is available, which includes: * rust-lang/rust#130005 [0] * rust-lang/rust#131519 [1] Note that currently meta-lts-mixins [2] provides the following versions: * kirkstone: `1.80.1` * scarthgap: `1.81.0` [0] rust-lang/rust#130005 [1] rust-lang/rust#131519 [2] https://git.yoctoproject.org/meta-lts-mixins Signed-off-by: Ariel D'Alessandro <[email protected]>
1 parent 6d5fb3c commit 301eb30

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ SRC_URI += "\
2727
file://0010-Don-t-require-profiler_builtins.rlib.patch \
2828
file://0011-Disable-crabbyavif-to-fix-build-errors.patch \
2929
file://0012-Revert-Allow-and-use-std-hardware_destructive_interf.patch \
30+
file://0013-Revert-Set-Rust-symbol-visibility-to-hidden-when-C-s.patch \
3031
"
3132
# ARM/AArch64-specific patches.
3233
SRC_URI:append:aarch64 = "${@bb.utils.contains('TUNE_FEATURES', 'crypto', '', ' file://arm/0001-Fix-AES-crypto-SIGILL-on-rpi4-64.patch', d)}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
From 6302ea4936e24232af4d50257b94a079471063cf Mon Sep 17 00:00:00 2001
2+
From: Ariel D'Alessandro <[email protected]>
3+
Date: Thu, 14 Nov 2024 22:23:28 -0300
4+
Subject: [PATCH] Revert "Set Rust symbol visibility to hidden when C++ symbols
5+
are"
6+
7+
This reverts chromium commit ee3900fd57b3c580aefff15c64052904d81b7760.
8+
* Change-Id: https://crrev.com/c/5966273
9+
10+
Fixes the following compilation error:
11+
12+
```
13+
| FAILED: obj/third_party/rust/ryu/v1/lib/libryu_lib.rlib
14+
[...]
15+
| error: unknown unstable option: `default-visibility`
16+
```
17+
18+
This patch will be dropped once Rust >= 1.83 is available, which
19+
includes:
20+
* rust-lang/rust#130005 [0]
21+
* rust-lang/rust#131519 [1]
22+
23+
Note that currently meta-lts-mixins [2] provides the following versions:
24+
* kirkstone: `1.80.1`
25+
* scarthgap: `1.81.0`
26+
27+
[0] https://github.com/rust-lang/rust/pull/130005
28+
[1] https://github.com/rust-lang/rust/pull/131519
29+
[2] https://git.yoctoproject.org/meta-lts-mixins
30+
31+
Upstream-Status: Inappropriate [specific to older versions of rust]
32+
Signed-off-by: Ariel D'Alessandro <[email protected]>
33+
---
34+
build/config/gcc/BUILD.gn | 1 -
35+
build/sanitizers/asan_suppressions.cc | 13 +++++++++++++
36+
2 files changed, 13 insertions(+), 1 deletion(-)
37+
38+
diff --git a/build/config/gcc/BUILD.gn b/build/config/gcc/BUILD.gn
39+
index a659210b196aa..147ebfc53426c 100644
40+
--- a/build/config/gcc/BUILD.gn
41+
+++ b/build/config/gcc/BUILD.gn
42+
@@ -32,7 +32,6 @@ declare_args() {
43+
# See http://gcc.gnu.org/wiki/Visibility
44+
config("symbol_visibility_hidden") {
45+
cflags = [ "-fvisibility=hidden" ]
46+
- rustflags = [ "-Zdefault-visibility=hidden" ]
47+
48+
# Visibility attribute is not supported on AIX.
49+
if (current_os != "aix") {
50+
diff --git a/build/sanitizers/asan_suppressions.cc b/build/sanitizers/asan_suppressions.cc
51+
index bfbd4b792a919..f0557be762c40 100644
52+
--- a/build/sanitizers/asan_suppressions.cc
53+
+++ b/build/sanitizers/asan_suppressions.cc
54+
@@ -15,6 +15,19 @@
55+
// // http://crbug.com/178677
56+
// "interceptor_via_lib:libsqlite3.so\n"
57+
char kASanDefaultSuppressions[] =
58+
+ // https://crbug.com/1471542 false positive odr violations from Rust code.
59+
+ "odr_violation:^core::\n"
60+
+ "odr_violation:^object::\n"
61+
+ "odr_violation:^std::io::\n"
62+
+ "odr_violation:^serde::\n"
63+
+ "odr_violation:^serde_json_lenient::\n"
64+
+ "odr_violation:^std::panicking::\n"
65+
+ "odr_violation:^std::thread::Builder::\n"
66+
+ "odr_violation:^read_fonts::tables::\n"
67+
+ "odr_violation:^std_detect::detect::cache::\n"
68+
+ "odr_violation:^alloc::sync::\n"
69+
+ "odr_violation:^log::\n"
70+
+
71+
// End of suppressions.
72+
// PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS.
73+
""; // Please keep this semicolon.

0 commit comments

Comments
 (0)