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

Unified Diff: base/allocator/BUILD.gn

Issue 2019183002: Restore the -fvisibility=hidden flag for tcmalloc when using allocator shim. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | base/allocator/allocator.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/BUILD.gn
diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn
index 96ccad239a5455f0dc72e07c4a67fe18a03aa151..d25239ae6f849ea320cb44f72ea7c734c7883cd6 100644
--- a/base/allocator/BUILD.gn
+++ b/base/allocator/BUILD.gn
@@ -236,8 +236,16 @@ if (use_allocator == "tcmalloc") {
"-Wno-unused-result",
]
- configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
- configs += [ "//build/config/gcc:symbol_visibility_default" ]
+ # Compiling tcmalloc with -fvisibility=default is only necessary when
+ # not using the allocator shim, which provides the correct visibility
+ # annotations for those symbols which need to be exported (see
+ # //base/allocator/allocator_shim_override_glibc_weak_symbols.h and
+ # //base/allocator/allocator_shim_internals.h for the definition of
+ # SHIM_ALWAYS_EXPORT).
+ if (!use_experimental_allocator_shim) {
+ configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
+ configs += [ "//build/config/gcc:symbol_visibility_default" ]
+ }
ldflags = [
# Don't let linker rip this symbol out, otherwise the heap&cpu
« no previous file with comments | « no previous file | base/allocator/allocator.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698