| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 54   import("//build/config/win/visual_studio_version.gni") | 54   import("//build/config/win/visual_studio_version.gni") | 
| 55 | 55 | 
| 56   config("nocmt") { | 56   config("nocmt") { | 
| 57     ldflags = [ | 57     ldflags = [ | 
| 58       "/NODEFAULTLIB:libcmt", | 58       "/NODEFAULTLIB:libcmt", | 
| 59       "/NODEFAULTLIB:libcmtd", | 59       "/NODEFAULTLIB:libcmtd", | 
| 60     ] | 60     ] | 
| 61     libs = [ rebase_path("$target_gen_dir/allocator/libcmt.lib") ] | 61     libs = [ rebase_path("$target_gen_dir/allocator/libcmt.lib") ] | 
| 62   } | 62   } | 
| 63 | 63 | 
| 64   action("prep_libc") { | 64   if (!is_component_build) { | 
| 65     script = "prep_libc.py" | 65     action("prep_libc") { | 
| 66     outputs = [ | 66       script = "prep_libc.py" | 
| 67       "$target_gen_dir/allocator/libcmt.lib", | 67       outputs = [ | 
| 68     ] | 68         "$target_gen_dir/allocator/libcmt.lib", | 
| 69     args = [ | 69       ] | 
| 70       visual_studio_path + "/vc/lib", | 70       args = [ | 
| 71       rebase_path("$target_gen_dir/allocator"), | 71         visual_studio_path + "/vc/lib", | 
| 72       current_cpu, | 72         rebase_path("$target_gen_dir/allocator"), | 
| 73     ] | 73         current_cpu, | 
| 74   } | 74       ] | 
|  | 75     } | 
| 75 | 76 | 
| 76   source_set("allocator_shim") { | 77     source_set("allocator_shim") { | 
| 77     sources = [ | 78       sources = [ | 
| 78       "allocator_shim_win.cc", | 79         "allocator_shim_win.cc", | 
| 79     ] | 80       ] | 
| 80     configs -= [ "//build/config/compiler:chromium_code" ] | 81       configs -= [ "//build/config/compiler:chromium_code" ] | 
| 81     configs += [ "//build/config/compiler:no_chromium_code" ] | 82       configs += [ "//build/config/compiler:no_chromium_code" ] | 
| 82 | 83 | 
| 83     public_configs = [ ":nocmt" ] | 84       public_configs = [ ":nocmt" ] | 
| 84     deps = [ | 85       deps = [ | 
| 85       ":prep_libc", | 86         ":prep_libc", | 
| 86     ] | 87       ] | 
|  | 88     } | 
| 87   } | 89   } | 
| 88 } | 90 } | 
| 89 | 91 | 
| 90 if (use_allocator == "tcmalloc") { | 92 if (use_allocator == "tcmalloc") { | 
| 91   # tcmalloc currently won't compile on Android. | 93   # tcmalloc currently won't compile on Android. | 
| 92   source_set("tcmalloc") { | 94   source_set("tcmalloc") { | 
| 93     tcmalloc_dir = "//third_party/tcmalloc/chromium" | 95     tcmalloc_dir = "//third_party/tcmalloc/chromium" | 
| 94 | 96 | 
| 95     # Don't check tcmalloc's includes. These files include various files like | 97     # Don't check tcmalloc's includes. These files include various files like | 
| 96     # base/foo.h and they actually refer to tcmalloc's forked copy of base | 98     # base/foo.h and they actually refer to tcmalloc's forked copy of base | 
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 303   visibility = [ "//base/*" ] | 305   visibility = [ "//base/*" ] | 
| 304   sources = [ | 306   sources = [ | 
| 305     "allocator_extension_thunks.cc", | 307     "allocator_extension_thunks.cc", | 
| 306     "allocator_extension_thunks.h", | 308     "allocator_extension_thunks.h", | 
| 307   ] | 309   ] | 
| 308   if (is_android && !is_debug) { | 310   if (is_android && !is_debug) { | 
| 309     configs -= [ "//build/config/compiler:optimize" ] | 311     configs -= [ "//build/config/compiler:optimize" ] | 
| 310     configs += [ "//build/config/compiler:optimize_max" ] | 312     configs += [ "//build/config/compiler:optimize_max" ] | 
| 311   } | 313   } | 
| 312 } | 314 } | 
| OLD | NEW | 
|---|