Skip to content

Commit 9932b52

Browse files
committed
chromium: [PATCH] Revert "Set Rust symbol visibility to hidden when ..."
This reverts chromium commit ee3900fd57b3c580aefff15c64052904d81b7760. Fix the following compilation error: ``` | FAILED: obj/third_party/rust/ryu/v1/lib/libryu_lib.rlib [...] | error: unknown unstable option: `default-visibility` ``` Signed-off-by: Ariel D'Alessandro <[email protected]>
1 parent 6528dc7 commit 9932b52

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-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-Disable-crabbyavif-to-fix-build-errors.patch \
2828
file://0011-Revert-Allow-and-use-std-hardware_destructive_interf.patch \
2929
file://0012-build-config-compiler-BUILD.gn-Disable-CREL.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,60 @@
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 commit ee3900fd57b3c580aefff15c64052904d81b7760.
8+
9+
Fix the following compilation error:
10+
11+
```
12+
| FAILED: obj/third_party/rust/ryu/v1/lib/libryu_lib.rlib
13+
[...]
14+
| error: unknown unstable option: `default-visibility`
15+
```
16+
17+
---
18+
build/config/gcc/BUILD.gn | 1 -
19+
build/sanitizers/asan_suppressions.cc | 13 +++++++++++++
20+
2 files changed, 13 insertions(+), 1 deletion(-)
21+
22+
diff --git a/build/config/gcc/BUILD.gn b/build/config/gcc/BUILD.gn
23+
index a659210b196aa..147ebfc53426c 100644
24+
--- a/build/config/gcc/BUILD.gn
25+
+++ b/build/config/gcc/BUILD.gn
26+
@@ -32,7 +32,6 @@ declare_args() {
27+
# See http://gcc.gnu.org/wiki/Visibility
28+
config("symbol_visibility_hidden") {
29+
cflags = [ "-fvisibility=hidden" ]
30+
- rustflags = [ "-Zdefault-visibility=hidden" ]
31+
32+
# Visibility attribute is not supported on AIX.
33+
if (current_os != "aix") {
34+
diff --git a/build/sanitizers/asan_suppressions.cc b/build/sanitizers/asan_suppressions.cc
35+
index bfbd4b792a919..f0557be762c40 100644
36+
--- a/build/sanitizers/asan_suppressions.cc
37+
+++ b/build/sanitizers/asan_suppressions.cc
38+
@@ -15,6 +15,19 @@
39+
// // http://crbug.com/178677
40+
// "interceptor_via_lib:libsqlite3.so\n"
41+
char kASanDefaultSuppressions[] =
42+
+ // https://crbug.com/1471542 false positive odr violations from Rust code.
43+
+ "odr_violation:^core::\n"
44+
+ "odr_violation:^object::\n"
45+
+ "odr_violation:^std::io::\n"
46+
+ "odr_violation:^serde::\n"
47+
+ "odr_violation:^serde_json_lenient::\n"
48+
+ "odr_violation:^std::panicking::\n"
49+
+ "odr_violation:^std::thread::Builder::\n"
50+
+ "odr_violation:^read_fonts::tables::\n"
51+
+ "odr_violation:^std_detect::detect::cache::\n"
52+
+ "odr_violation:^alloc::sync::\n"
53+
+ "odr_violation:^log::\n"
54+
+
55+
// End of suppressions.
56+
// PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS.
57+
""; // Please keep this semicolon.
58+
--
59+
2.45.2
60+

0 commit comments

Comments
 (0)