| 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 declare_args() { | 9 declare_args() { |
| 10 # Provide a way to force disable debugallocation in Debug builds, | 10 # Provide a way to force disable debugallocation in Debug builds, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 # This config is only used on Windows static release builds for the | 77 # This config is only used on Windows static release builds for the |
| 78 # allocator shim. | 78 # allocator shim. |
| 79 if (win_use_allocator_shim) { | 79 if (win_use_allocator_shim) { |
| 80 source_set("allocator_shim") { | 80 source_set("allocator_shim") { |
| 81 sources = [ | 81 sources = [ |
| 82 "allocator_shim_win.cc", | 82 "allocator_shim_win.cc", |
| 83 "allocator_shim_win.h", | 83 "allocator_shim_win.h", |
| 84 "winheap_stubs_win.cc", |
| 85 "winheap_stubs_win.h", |
| 84 ] | 86 ] |
| 85 configs += [ ":allocator_shim_define" ] | 87 configs += [ ":allocator_shim_define" ] |
| 86 } | 88 } |
| 87 } | 89 } |
| 88 | 90 |
| 89 if (use_allocator == "tcmalloc") { | 91 if (use_allocator == "tcmalloc") { |
| 90 # tcmalloc currently won't compile on Android. | 92 # tcmalloc currently won't compile on Android. |
| 91 source_set("tcmalloc") { | 93 source_set("tcmalloc") { |
| 92 tcmalloc_dir = "//third_party/tcmalloc/chromium" | 94 tcmalloc_dir = "//third_party/tcmalloc/chromium" |
| 93 | 95 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 configs -= [ "//build/config/compiler:default_optimization" ] | 267 configs -= [ "//build/config/compiler:default_optimization" ] |
| 266 configs += [ "//build/config/compiler:optimize_max" ] | 268 configs += [ "//build/config/compiler:optimize_max" ] |
| 267 } | 269 } |
| 268 | 270 |
| 269 deps += [ "//base/third_party/dynamic_annotations" ] | 271 deps += [ "//base/third_party/dynamic_annotations" ] |
| 270 } | 272 } |
| 271 } # use_allocator == "tcmalloc" | 273 } # use_allocator == "tcmalloc" |
| 272 | 274 |
| 273 buildflag_header("features") { | 275 buildflag_header("features") { |
| 274 header = "features.h" | 276 header = "features.h" |
| 275 flags = [ "USE_EXPERIMENTAL_ALLOCATOR_SHIM=$use_experimental_allocator_shim" ] | 277 flags = [ |
| 278 "USE_EXPERIMENTAL_ALLOCATOR_SHIM=$use_experimental_allocator_shim", |
| 279 "ENABLE_WIN_ALLOCATOR_SHIM_TESTS=($use_experimental_allocator_shim || $win_u
se_allocator_shim)", |
| 280 ] |
| 276 } | 281 } |
| 277 | 282 |
| 278 if (use_experimental_allocator_shim) { | 283 if (use_experimental_allocator_shim) { |
| 279 # Used to shim malloc symbols on Android. see //base/allocator/README.md. | 284 # Used to shim malloc symbols on Android. see //base/allocator/README.md. |
| 280 config("wrap_malloc_symbols") { | 285 config("wrap_malloc_symbols") { |
| 281 ldflags = [ | 286 ldflags = [ |
| 282 "-Wl,-wrap,calloc", | 287 "-Wl,-wrap,calloc", |
| 283 "-Wl,-wrap,free", | 288 "-Wl,-wrap,free", |
| 284 "-Wl,-wrap,malloc", | 289 "-Wl,-wrap,malloc", |
| 285 "-Wl,-wrap,memalign", | 290 "-Wl,-wrap,memalign", |
| (...skipping 28 matching lines...) Expand all Loading... |
| 314 sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ] | 319 sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ] |
| 315 } else if (is_android && use_allocator == "none") { | 320 } else if (is_android && use_allocator == "none") { |
| 316 sources += [ | 321 sources += [ |
| 317 "allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc", | 322 "allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc", |
| 318 "allocator_shim_override_linker_wrapped_symbols.h", | 323 "allocator_shim_override_linker_wrapped_symbols.h", |
| 319 ] | 324 ] |
| 320 all_dependent_configs = [ ":wrap_malloc_symbols" ] | 325 all_dependent_configs = [ ":wrap_malloc_symbols" ] |
| 321 } | 326 } |
| 322 } | 327 } |
| 323 } | 328 } |
| OLD | NEW |