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 # Only executables and not libraries should depend on the allocator target; | 7 # Only executables and not libraries should depend on the allocator target; |
8 # only the application (the final executable) knows what allocator makes sense. | 8 # only the application (the final executable) knows what allocator makes sense. |
9 # This "allocator" meta-target will forward to the default allocator according | 9 # This "allocator" meta-target will forward to the default allocator according |
10 # to the build settings. | 10 # to the build settings. |
(...skipping 19 matching lines...) Expand all Loading... |
30 script = "prep_libc.py" | 30 script = "prep_libc.py" |
31 outputs = [ "$target_gen_dir/allocator/libcmt.lib" ] | 31 outputs = [ "$target_gen_dir/allocator/libcmt.lib" ] |
32 args = [ | 32 args = [ |
33 visual_studio_path + "/vc/lib", | 33 visual_studio_path + "/vc/lib", |
34 rebase_path("$target_gen_dir/allocator"), | 34 rebase_path("$target_gen_dir/allocator"), |
35 cpu_arch, | 35 cpu_arch, |
36 ] | 36 ] |
37 } | 37 } |
38 } | 38 } |
39 | 39 |
40 if (!is_android) { | 40 if (use_allocator == "tcmalloc") { |
41 # tcmalloc currently won't compile on Android. | 41 # tcmalloc currently won't compile on Android. |
42 source_set("tcmalloc") { | 42 source_set("tcmalloc") { |
43 tcmalloc_dir = "//third_party/tcmalloc/chromium" | 43 tcmalloc_dir = "//third_party/tcmalloc/chromium" |
44 | 44 |
45 sources = [ | 45 sources = [ |
46 # Generated for our configuration from tcmalloc"s build | 46 # Generated for our configuration from tcmalloc"s build |
47 # and checked in. | 47 # and checked in. |
48 "$tcmalloc_dir/src/config.h", | 48 "$tcmalloc_dir/src/config.h", |
49 "$tcmalloc_dir/src/config_android.h", | 49 "$tcmalloc_dir/src/config_android.h", |
50 "$tcmalloc_dir/src/config_linux.h", | 50 "$tcmalloc_dir/src/config_linux.h", |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 visibility = [ "//base/*" ] | 243 visibility = [ "//base/*" ] |
244 sources = [ | 244 sources = [ |
245 "allocator_extension_thunks.cc", | 245 "allocator_extension_thunks.cc", |
246 "allocator_extension_thunks.h", | 246 "allocator_extension_thunks.h", |
247 ] | 247 ] |
248 if (is_android && !is_debug) { | 248 if (is_android && !is_debug) { |
249 configs -= [ "//build/config/compiler:optimize" ] | 249 configs -= [ "//build/config/compiler:optimize" ] |
250 configs += [ "//build/config/compiler:optimize_max" ] | 250 configs += [ "//build/config/compiler:optimize_max" ] |
251 } | 251 } |
252 } | 252 } |
OLD | NEW |