| 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 import("//build/config/compiler/compiler.gni") | 6 import("//build/config/compiler/compiler.gni") |
| 7 | 7 |
| 8 declare_args() { | 8 declare_args() { |
| 9 # Provide a way to force disable debugallocation in Debug builds, | 9 # Provide a way to force disable debugallocation in Debug builds, |
| 10 # e.g. for profiling (it's more rare to profile Debug builds, | 10 # e.g. for profiling (it's more rare to profile Debug builds, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 deps = [ | 92 deps = [ |
| 93 ":prep_libc", | 93 ":prep_libc", |
| 94 "//base", | 94 "//base", |
| 95 ] | 95 ] |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 | 99 |
| 100 if (use_allocator == "tcmalloc") { | 100 if (use_allocator == "tcmalloc") { |
| 101 # tcmalloc currently won't compile on Android. | 101 # tcmalloc currently won't compile on Android. |
| 102 source_set("tcmalloc") { | 102 # TODO(crbug.com/559766) this should be a source_set but |
| 103 # there are static initializers that get accidentally linked |
| 104 # into chrome from vdso_support.cc that need to be addressed first. |
| 105 static_library("tcmalloc") { |
| 103 tcmalloc_dir = "//third_party/tcmalloc/chromium" | 106 tcmalloc_dir = "//third_party/tcmalloc/chromium" |
| 104 | 107 |
| 105 # Don't check tcmalloc's includes. These files include various files like | 108 # Don't check tcmalloc's includes. These files include various files like |
| 106 # base/foo.h and they actually refer to tcmalloc's forked copy of base | 109 # base/foo.h and they actually refer to tcmalloc's forked copy of base |
| 107 # rather than the regular one, which confuses the header checker. | 110 # rather than the regular one, which confuses the header checker. |
| 108 check_includes = false | 111 check_includes = false |
| 109 | 112 |
| 110 sources = [ | 113 sources = [ |
| 111 # Generated for our configuration from tcmalloc's build | 114 # Generated for our configuration from tcmalloc's build |
| 112 # and checked in. | 115 # and checked in. |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 # Make sure the allocation library is optimized as much as possible when | 268 # Make sure the allocation library is optimized as much as possible when |
| 266 # we"re in release mode. | 269 # we"re in release mode. |
| 267 if (!is_debug) { | 270 if (!is_debug) { |
| 268 configs -= [ "//build/config/compiler:default_optimization" ] | 271 configs -= [ "//build/config/compiler:default_optimization" ] |
| 269 configs += [ "//build/config/compiler:optimize_max" ] | 272 configs += [ "//build/config/compiler:optimize_max" ] |
| 270 } | 273 } |
| 271 | 274 |
| 272 deps += [ "//base/third_party/dynamic_annotations" ] | 275 deps += [ "//base/third_party/dynamic_annotations" ] |
| 273 } | 276 } |
| 274 } # !is_android | 277 } # !is_android |
| OLD | NEW |