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