Index: base/allocator/allocator.gyp |
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp |
index 3844c08add8931874faafec352bf49f850cee7ef..674d4d645f79a2b4a7de7d56589c4bacdb479e65 100644 |
--- a/base/allocator/allocator.gyp |
+++ b/base/allocator/allocator.gyp |
@@ -301,9 +301,6 @@ |
'-Wno-sign-compare', |
'-Wno-unused-result', |
], |
- 'cflags!': [ |
- '-fvisibility=hidden', |
- ], |
'link_settings': { |
'ldflags': [ |
# Don't let linker rip this symbol out, otherwise the heap&cpu |
@@ -315,6 +312,19 @@ |
'-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv', |
], |
}, |
+ # 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). |
+ 'conditions': [ |
+ ['use_experimental_allocator_shim==0', { |
+ 'cflags!': [ |
+ '-fvisibility=hidden', |
+ ], |
+ }], |
+ ], |
}], |
['profiling!=1', { |
'sources!': [ |