| Index: base/allocator/BUILD.gn
|
| diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn
|
| index 401519662f3f17d2f249646449eeea1d85241df4..4221b0b60361832055447fc6237d1fb218613d02 100644
|
| --- a/base/allocator/BUILD.gn
|
| +++ b/base/allocator/BUILD.gn
|
| @@ -13,38 +13,6 @@ declare_args() {
|
| enable_debugallocation = is_debug
|
| }
|
|
|
| -# The Windows-only allocator shim is only enabled for Release static builds, and
|
| -# is mutually exclusive with the generalized shim.
|
| -win_use_allocator_shim = is_win && !is_component_build && !is_debug &&
|
| - !use_experimental_allocator_shim && !is_asan
|
| -
|
| -# This "allocator" meta-target will forward to the default allocator according
|
| -# to the build settings.
|
| -group("allocator") {
|
| - public_deps = []
|
| - deps = []
|
| -
|
| - if (use_allocator == "tcmalloc") {
|
| - deps += [ ":tcmalloc" ]
|
| - }
|
| -
|
| - if (win_use_allocator_shim) {
|
| - public_deps += [ ":allocator_shim" ]
|
| - }
|
| -}
|
| -
|
| -# This config defines ALLOCATOR_SHIM in the same conditions that the allocator
|
| -# shim will be used by the allocator target.
|
| -#
|
| -# TODO(brettw) this is only used in one place and is kind of mess, because it
|
| -# assumes that the library using it will eventually be linked with
|
| -# //base/allocator in the default way. Clean this up and delete this.
|
| -config("allocator_shim_define") {
|
| - if (win_use_allocator_shim) {
|
| - defines = [ "ALLOCATOR_SHIM" ]
|
| - }
|
| -}
|
| -
|
| config("tcmalloc_flags") {
|
| defines = []
|
| if (enable_debugallocation) {
|
| @@ -88,20 +56,6 @@ config("tcmalloc_flags") {
|
| }
|
| }
|
|
|
| -# This config is only used on Windows static release builds for the
|
| -# allocator shim.
|
| -if (win_use_allocator_shim) {
|
| - source_set("allocator_shim") {
|
| - sources = [
|
| - "allocator_shim_win.cc",
|
| - "allocator_shim_win.h",
|
| - "winheap_stubs_win.cc",
|
| - "winheap_stubs_win.h",
|
| - ]
|
| - configs += [ ":allocator_shim_define" ]
|
| - }
|
| -}
|
| -
|
| if (use_allocator == "tcmalloc") {
|
| # tcmalloc currently won't compile on Android.
|
| source_set("tcmalloc") {
|
| @@ -285,65 +239,3 @@ if (use_allocator == "tcmalloc") {
|
| deps += [ "//base/third_party/dynamic_annotations" ]
|
| }
|
| } # use_allocator == "tcmalloc"
|
| -
|
| -buildflag_header("features") {
|
| - header = "features.h"
|
| - flags = [
|
| - "USE_EXPERIMENTAL_ALLOCATOR_SHIM=$use_experimental_allocator_shim",
|
| - "ENABLE_WIN_ALLOCATOR_SHIM_TESTS=($use_experimental_allocator_shim || $win_use_allocator_shim)",
|
| - ]
|
| -}
|
| -
|
| -if (use_experimental_allocator_shim) {
|
| - # Used to shim malloc symbols on Android. see //base/allocator/README.md.
|
| - config("wrap_malloc_symbols") {
|
| - 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",
|
| - ]
|
| - }
|
| -
|
| - source_set("unified_allocator_shim") {
|
| - # TODO(primiano): support other platforms, currently this works only on
|
| - # Linux/CrOS/Android. http://crbug.com/550886 .
|
| - configs += [ "//base:base_implementation" ] # for BASE_EXPORT
|
| - visibility = [ "//base:base" ]
|
| - sources = [
|
| - "allocator_shim.cc",
|
| - "allocator_shim.h",
|
| - "allocator_shim_internals.h",
|
| - "allocator_shim_override_cpp_symbols.h",
|
| - "allocator_shim_override_libc_symbols.h",
|
| - ]
|
| - if (is_win) {
|
| - sources += [
|
| - "allocator_shim_default_dispatch_to_winheap.cc",
|
| - "allocator_shim_override_ucrt_symbols_win.h",
|
| - "winheap_stubs_win.cc",
|
| - "winheap_stubs_win.h",
|
| - ]
|
| - } else if (is_linux && use_allocator == "tcmalloc") {
|
| - sources += [
|
| - "allocator_shim_default_dispatch_to_tcmalloc.cc",
|
| - "allocator_shim_override_glibc_weak_symbols.h",
|
| - ]
|
| - deps = [
|
| - ":tcmalloc",
|
| - ]
|
| - } else if (is_linux && use_allocator == "none") {
|
| - sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ]
|
| - } else if (is_android && use_allocator == "none") {
|
| - sources += [
|
| - "allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc",
|
| - "allocator_shim_override_linker_wrapped_symbols.h",
|
| - ]
|
| - all_dependent_configs = [ ":wrap_malloc_symbols" ]
|
| - }
|
| - }
|
| -}
|
|
|