Chromium Code Reviews| Index: base/allocator/allocator.gyp |
| diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp |
| index 8d241d1b8983bc2acf9ab1041cafdf36d012871a..12449975dd2af6dae080034c054ebd3a86817b60 100644 |
| --- a/base/allocator/allocator.gyp |
| +++ b/base/allocator/allocator.gyp |
| @@ -406,11 +406,32 @@ |
| 'allocator_shim_override_glibc_weak_symbols.h', |
| ], |
| }], |
| - ['OS=="linux" and use_allocator=="none"', { |
| + ['use_allocator=="none" and (OS=="linux" or (OS=="android" and _toolset == "host" and host_os == "linux"))', { |
| 'sources': [ |
| 'allocator_shim_default_dispatch_to_glibc.cc', |
| ], |
| }], |
| + ['OS=="android" and _toolset == "target"', { |
| + 'sources': [ |
| + 'allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc', |
| + 'allocator_shim_override_linker_wrapped_symbols.h', |
| + ], |
| + # On Android all references to malloc & fridns symbols are |
|
Nico
2016/04/08 20:23:07
nit: typo fridns
Primiano Tucci (use gerrit)
2016/04/11 13:49:13
Done.
|
| + # rewritten, at link time, and routed to the shim. |
| + # See //base/allocator/README.md. |
| + 'all_dependent_settings': { |
| + 'ldflags': [ |
| + '-Wl,-wrap,calloc', |
| + '-Wl,-wrap,free', |
| + '-Wl,-wrap,malloc', |
| + '-Wl,-wrap,memalign', |
| + '-Wl,-wrap,posix_memalign', |
| + '-Wl,-wrap,pvalloc', |
| + '-Wl,-wrap,realloc', |
| + '-Wl,-wrap,valloc', |
| + ], |
| + }, |
| + }], |
| ] |
| }, # 'unified_allocator_shim' target. |
| ], |