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

Unified Diff: base/allocator/allocator.gyp

Issue 1675143004: Allocator shim skeleton + Linux impl behind a build flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shim_exp_flag
Patch Set: Make self the 1st arg Created 4 years, 9 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/BUILD.gn ('k') | base/allocator/allocator_shim.h » ('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 b5d751eadd4a7bf48d95807740622e2341274ae3..adc78fdbf7a3f5a79eb258be4697a70291ab948b 100644
--- a/base/allocator/allocator.gyp
+++ b/base/allocator/allocator.gyp
@@ -20,7 +20,6 @@
# e.g. for profiling (it's more rare to profile Debug builds,
# but people sometimes need to do that).
'disable_debugallocation%': 0,
- 'use_experimental_allocator_shim%': 0,
},
'targets': [
# The only targets that should depend on allocator are 'base' and
@@ -379,6 +378,18 @@
}],
], # conditions of 'allocator' target.
}, # 'allocator' target.
+ {
+ # GN: //base/allocator:features
+ 'target_name': 'allocator_features',
+ 'includes': [ '../../build/buildflag_header.gypi' ],
+ 'toolsets': ['host', 'target'],
+ 'variables': {
+ 'buildflag_header_path': 'base/allocator/features.h',
+ 'buildflag_flags': [
+ 'USE_EXPERIMENTAL_ALLOCATOR_SHIM=<(use_experimental_allocator_shim)',
+ ],
+ },
+ }, # 'allocator_features' target.
], # targets.
'conditions': [
['OS=="win" and win_use_allocator_shim==1', {
@@ -408,5 +419,39 @@
},
],
}],
+ ['use_experimental_allocator_shim==1', {
+ 'targets': [
+ {
+ # GN: //base/allocator:unified_allocator_shim
+ 'target_name': 'unified_allocator_shim',
+ 'toolsets': ['host', 'target'],
+ 'type': 'static_library',
+ 'defines': [ 'BASE_IMPLEMENTATION' ],
+ 'sources': [
+ 'allocator_shim.cc',
+ 'allocator_shim.h',
+ 'allocator_shim_internals.h',
+ 'allocator_shim_override_cpp_symbols.h',
+ 'allocator_shim_override_libc_symbols.h',
+ ],
+ 'include_dirs': [
+ '../..',
+ ],
+ 'conditions': [
+ ['OS=="linux" and use_allocator=="tcmalloc"', {
+ 'sources': [
+ 'allocator_shim_default_dispatch_to_tcmalloc.cc',
+ 'allocator_shim_override_glibc_weak_symbols.h',
+ ],
+ }],
+ ['OS=="linux" and use_allocator=="none"', {
+ 'sources': [
+ 'allocator_shim_default_dispatch_to_glibc.cc',
+ ],
+ }],
+ ]
+ }, # 'unified_allocator_shim' target.
+ ],
+ }]
],
}
« no previous file with comments | « base/allocator/BUILD.gn ('k') | base/allocator/allocator_shim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698