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

Unified Diff: base/allocator/allocator.gyp

Issue 1719433002: Introduce allocator shim for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shim_traceintegration
Patch Set: Add readme changes, do NOT enabled by default in this cl Created 4 years, 8 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 | « base/allocator/README.md ('k') | base/allocator/allocator_shim.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator.gyp
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp
index 8d241d1b8983bc2acf9ab1041cafdf36d012871a..3844c08add8931874faafec352bf49f850cee7ef 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 & friends symbols are
+ # 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.
],
« no previous file with comments | « base/allocator/README.md ('k') | base/allocator/allocator_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698