| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
| 6 import("//build/config/allocator.gni") | 6 import("//build/config/allocator.gni") |
| 7 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
| 8 | 8 |
| 9 if (is_win) { | 9 if (is_win) { |
| 10 import("//build/config/win/visual_studio_version.gni") | 10 import("//build/config/win/visual_studio_version.gni") |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 configs -= [ "//build/config/compiler:default_optimization" ] | 291 configs -= [ "//build/config/compiler:default_optimization" ] |
| 292 configs += [ "//build/config/compiler:optimize_max" ] | 292 configs += [ "//build/config/compiler:optimize_max" ] |
| 293 } | 293 } |
| 294 | 294 |
| 295 deps += [ "//base/third_party/dynamic_annotations" ] | 295 deps += [ "//base/third_party/dynamic_annotations" ] |
| 296 } | 296 } |
| 297 } # use_allocator == "tcmalloc" | 297 } # use_allocator == "tcmalloc" |
| 298 | 298 |
| 299 buildflag_header("features") { | 299 buildflag_header("features") { |
| 300 header = "features.h" | 300 header = "features.h" |
| 301 flags = [ "USE_EXPERIMENTAL_ALLOCATOR_SHIM=$use_experimental_allocator_shim" ] | 301 flags = [ |
| 302 "USE_EXPERIMENTAL_ALLOCATOR_SHIM=$use_experimental_allocator_shim", |
| 303 "USE_EXPERIMENTAL_ALLOCATION_TRACING=$use_experimental_allocation_tracing", |
| 304 ] |
| 302 } | 305 } |
| 303 | 306 |
| 304 if (use_experimental_allocator_shim) { | 307 if (use_experimental_allocator_shim) { |
| 305 source_set("unified_allocator_shim") { | 308 source_set("unified_allocator_shim") { |
| 306 # TODO(primiano): support other platforms, currently this works only on | 309 # TODO(primiano): support other platforms, currently this works only on |
| 307 # Linux/CrOS. http://crbug.com/550886 . | 310 # Linux/CrOS. http://crbug.com/550886 . |
| 308 configs += [ "//base:base_implementation" ] # for BASE_EXPORT | 311 configs += [ "//base:base_implementation" ] # for BASE_EXPORT |
| 309 visibility = [ "//base:base" ] | 312 visibility = [ "//base:base" ] |
| 310 sources = [ | 313 sources = [ |
| 311 "allocator_shim.cc", | 314 "allocator_shim.cc", |
| 312 "allocator_shim.h", | 315 "allocator_shim.h", |
| 313 "allocator_shim_internals.h", | 316 "allocator_shim_internals.h", |
| 314 "allocator_shim_override_cpp_symbols.h", | 317 "allocator_shim_override_cpp_symbols.h", |
| 315 "allocator_shim_override_libc_symbols.h", | 318 "allocator_shim_override_libc_symbols.h", |
| 316 ] | 319 ] |
| 317 if (is_linux && use_allocator == "tcmalloc") { | 320 if (is_linux && use_allocator == "tcmalloc") { |
| 318 sources += [ | 321 sources += [ |
| 319 "allocator_shim_default_dispatch_to_tcmalloc.cc", | 322 "allocator_shim_default_dispatch_to_tcmalloc.cc", |
| 320 "allocator_shim_override_glibc_weak_symbols.h", | 323 "allocator_shim_override_glibc_weak_symbols.h", |
| 321 ] | 324 ] |
| 322 deps = [ | 325 deps = [ |
| 323 ":tcmalloc", | 326 ":tcmalloc", |
| 324 ] | 327 ] |
| 325 } else if (is_linux && use_allocator == "none") { | 328 } else if (is_linux && use_allocator == "none") { |
| 326 sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ] | 329 sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ] |
| 327 } | 330 } |
| 328 } | 331 } |
| 329 } | 332 } |
| OLD | NEW |