Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: third_party/libc++/BUILD.gn

Issue 2938913003: Force hidden symbol visibility for allocation operators (Closed)
Patch Set: Remove stdlib_new_delete from libc++abi Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/libc++/alloc_visibility_overrides.S » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libc++/BUILD.gn
diff --git a/third_party/libc++/BUILD.gn b/third_party/libc++/BUILD.gn
index ff51ab9260f771fcdafc6fa7f937bbe0dff607aa..8fc686b6d28b1a229a6bf3f6bd7cd4105216f0ca 100644
--- a/third_party/libc++/BUILD.gn
+++ b/third_party/libc++/BUILD.gn
@@ -98,6 +98,18 @@ target(link_target_type, "libc++") {
"trunk/src/valarray.cpp",
"trunk/src/variant.cpp",
]
+ if (libcpp_is_static) {
+ # Current gcc and clang do not allow declaring several allocation
+ # operators with hidden visibility [1] [2], however we don't want
+ # these symbols exported on static builds. This is a workaround
+ # that takes advantage of an ELF visibility merging rule that
+ # picks the "most hidden" visibility of all versions of a symbol,
+ # even if the symbol is undefined.
+ #
+ # [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81107
+ # [2] https://bugs.llvm.org/show_bug.cgi?id=33473
+ sources += [ "alloc_visibility_overrides.S" ]
+ }
configs -= [
"//build/config/compiler:chromium_code",
"//build/config/compiler:no_rtti",
« no previous file with comments | « no previous file | third_party/libc++/alloc_visibility_overrides.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698