|
| 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