Chromium Code Reviews| 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/config/allocator.gni") | 5 import("//build/config/allocator.gni") |
| 6 | 6 |
| 7 declare_args() { | 7 declare_args() { |
| 8 # Provide a way to force disable debugallocation in Debug builds, | 8 # Provide a way to force disable debugallocation in Debug builds, |
| 9 # e.g. for profiling (it's more rare to profile Debug builds, | 9 # e.g. for profiling (it's more rare to profile Debug builds, |
| 10 # but people sometimes need to do that). | 10 # but people sometimes need to do that). |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 219 ] | 219 ] |
| 220 | 220 |
| 221 configs -= [ "//build/config/compiler:chromium_code" ] | 221 configs -= [ "//build/config/compiler:chromium_code" ] |
| 222 configs += [ | 222 configs += [ |
| 223 "//build/config/compiler:no_chromium_code", | 223 "//build/config/compiler:no_chromium_code", |
| 224 ":tcmalloc_flags", | 224 ":tcmalloc_flags", |
| 225 ] | 225 ] |
| 226 | 226 |
| 227 deps = [] | 227 deps = [] |
| 228 | 228 |
| 229 if (is_win) { | |
| 230 sources -= [ | |
| 231 "$tcmalloc_dir/src/base/elf_mem_image.cc", | |
| 232 "$tcmalloc_dir/src/base/elf_mem_image.h", | |
| 233 "$tcmalloc_dir/src/base/linuxthreads.cc", | |
| 234 "$tcmalloc_dir/src/base/linuxthreads.h", | |
| 235 "$tcmalloc_dir/src/base/vdso_support.cc", | |
| 236 "$tcmalloc_dir/src/base/vdso_support.h", | |
| 237 "$tcmalloc_dir/src/maybe_threads.cc", | |
| 238 "$tcmalloc_dir/src/maybe_threads.h", | |
| 239 "$tcmalloc_dir/src/symbolize.h", | |
| 240 "$tcmalloc_dir/src/system-alloc.cc", | |
| 241 "$tcmalloc_dir/src/system-alloc.h", | |
| 242 | |
| 243 # cpuprofiler | |
| 244 "$tcmalloc_dir/src/base/thread_lister.c", | |
| 245 "$tcmalloc_dir/src/base/thread_lister.h", | |
| 246 "$tcmalloc_dir/src/profile-handler.cc", | |
| 247 "$tcmalloc_dir/src/profile-handler.h", | |
| 248 "$tcmalloc_dir/src/profiledata.cc", | |
| 249 "$tcmalloc_dir/src/profiledata.h", | |
| 250 "$tcmalloc_dir/src/profiler.cc", | |
| 251 ] | |
| 252 defines += [ "PERFTOOLS_DLL_DECL=" ] | |
| 253 | |
| 254 configs -= [ | |
| 255 # Tcmalloc defines this itself, and we don't want duplicate definition | |
| 256 # warnings. | |
| 257 "//build/config/win:nominmax", | |
| 258 ] | |
| 259 | |
| 260 public_configs = [ ":nocmt" ] | |
| 261 | |
| 262 deps += [ ":prep_libc" ] | |
|
Ruud van Asseldonk
2015/12/04 17:25:37
Why can this be removed?
Primiano Tucci (use gerrit)
2015/12/04 17:40:21
becuse tcmalloc is not supported on android anymor
| |
| 263 } | |
| 264 | |
| 265 if (is_linux || is_android) { | 229 if (is_linux || is_android) { |
| 266 sources -= [ | 230 sources -= [ |
| 267 "$tcmalloc_dir/src/system-alloc.h", | 231 "$tcmalloc_dir/src/system-alloc.h", |
| 268 "$tcmalloc_dir/src/windows/port.cc", | 232 "$tcmalloc_dir/src/windows/port.cc", |
| 269 "$tcmalloc_dir/src/windows/port.h", | 233 "$tcmalloc_dir/src/windows/port.h", |
| 270 ] | 234 ] |
| 271 | 235 |
| 272 # We enable all warnings by default, but upstream disables a few. | 236 # We enable all warnings by default, but upstream disables a few. |
| 273 # Keep "-Wno-*" flags in sync with upstream by comparing against: | 237 # Keep "-Wno-*" flags in sync with upstream by comparing against: |
| 274 # http://code.google.com/p/google-perftools/source/browse/trunk/Makefile.a m | 238 # http://code.google.com/p/google-perftools/source/browse/trunk/Makefile.a m |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 292 } | 256 } |
| 293 | 257 |
| 294 # Make sure the allocation library is optimized as much as possible when | 258 # Make sure the allocation library is optimized as much as possible when |
| 295 # we"re in release mode. | 259 # we"re in release mode. |
| 296 if (!is_debug) { | 260 if (!is_debug) { |
| 297 configs -= [ "//build/config/compiler:default_optimization" ] | 261 configs -= [ "//build/config/compiler:default_optimization" ] |
| 298 configs += [ "//build/config/compiler:optimize_max" ] | 262 configs += [ "//build/config/compiler:optimize_max" ] |
| 299 } | 263 } |
| 300 | 264 |
| 301 deps += [ "//base/third_party/dynamic_annotations" ] | 265 deps += [ "//base/third_party/dynamic_annotations" ] |
| 302 | |
| 303 if (is_win) { | |
| 304 ldflags = [ "/ignore:4006:4221" ] | |
| 305 } | |
| 306 } | 266 } |
| 307 } # !is_android | 267 } # !is_android |
| 308 | 268 |
| 309 source_set("extension_thunks") { | 269 source_set("extension_thunks") { |
| 310 visibility = [ "//base/*" ] | 270 visibility = [ "//base/*" ] |
| 311 sources = [ | 271 sources = [ |
| 312 "allocator_extension_thunks.cc", | 272 "allocator_extension_thunks.cc", |
| 313 "allocator_extension_thunks.h", | 273 "allocator_extension_thunks.h", |
| 314 ] | 274 ] |
| 315 if (is_android && !is_debug) { | 275 if (is_android && !is_debug) { |
| 316 configs -= [ "//build/config/compiler:default_optimization" ] | 276 configs -= [ "//build/config/compiler:default_optimization" ] |
| 317 configs += [ "//build/config/compiler:optimize_max" ] | 277 configs += [ "//build/config/compiler:optimize_max" ] |
| 318 } | 278 } |
| 319 } | 279 } |
| OLD | NEW |