| 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 if (is_win) { | 8 if (is_win) { |
| 9 import("//build/config/win/visual_studio_version.gni") | 9 import("//build/config/win/visual_studio_version.gni") |
| 10 } | 10 } |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 deps = [ | 111 deps = [ |
| 112 ":prep_libc", | 112 ":prep_libc", |
| 113 "//base", | 113 "//base", |
| 114 ] | 114 ] |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 | 118 |
| 119 if (use_allocator == "tcmalloc") { | 119 if (use_allocator == "tcmalloc") { |
| 120 # tcmalloc currently won't compile on Android. | 120 # tcmalloc currently won't compile on Android. |
| 121 # TODO(crbug.com/559766) this should be a source_set but | 121 source_set("tcmalloc") { |
| 122 # there are static initializers that get accidentally linked | |
| 123 # into chrome from vdso_support.cc that need to be addressed first. | |
| 124 static_library("tcmalloc") { | |
| 125 tcmalloc_dir = "//third_party/tcmalloc/chromium" | 122 tcmalloc_dir = "//third_party/tcmalloc/chromium" |
| 126 | 123 |
| 127 # Don't check tcmalloc's includes. These files include various files like | 124 # Don't check tcmalloc's includes. These files include various files like |
| 128 # base/foo.h and they actually refer to tcmalloc's forked copy of base | 125 # base/foo.h and they actually refer to tcmalloc's forked copy of base |
| 129 # rather than the regular one, which confuses the header checker. | 126 # rather than the regular one, which confuses the header checker. |
| 130 check_includes = false | 127 check_includes = false |
| 131 | 128 |
| 132 sources = [ | 129 sources = [ |
| 133 # Generated for our configuration from tcmalloc's build | 130 # Generated for our configuration from tcmalloc's build |
| 134 # and checked in. | 131 # and checked in. |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 282 |
| 286 # Make sure the allocation library is optimized as much as possible when | 283 # Make sure the allocation library is optimized as much as possible when |
| 287 # we"re in release mode. | 284 # we"re in release mode. |
| 288 if (!is_debug) { | 285 if (!is_debug) { |
| 289 configs -= [ "//build/config/compiler:default_optimization" ] | 286 configs -= [ "//build/config/compiler:default_optimization" ] |
| 290 configs += [ "//build/config/compiler:optimize_max" ] | 287 configs += [ "//build/config/compiler:optimize_max" ] |
| 291 } | 288 } |
| 292 | 289 |
| 293 deps += [ "//base/third_party/dynamic_annotations" ] | 290 deps += [ "//base/third_party/dynamic_annotations" ] |
| 294 } | 291 } |
| 295 } # !is_android | 292 } # use_allocator == "tcmalloc" |
| OLD | NEW |