Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: base/allocator/BUILD.gn

Issue 1610673002: Revert of Allow base to depend on allocator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/BUILD.gn ('k') | base/allocator/allocator.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 }
11 11
12 declare_args() { 12 declare_args() {
13 # Provide a way to force disable debugallocation in Debug builds, 13 # Provide a way to force disable debugallocation in Debug builds,
14 # e.g. for profiling (it's more rare to profile Debug builds, 14 # e.g. for profiling (it's more rare to profile Debug builds,
15 # but people sometimes need to do that). 15 # but people sometimes need to do that).
16 enable_debugallocation = is_debug 16 enable_debugallocation = is_debug
17 } 17 }
18 18
19 # Only executables and not libraries should depend on the allocator target;
20 # only the application (the final executable) knows what allocator makes sense.
19 # This "allocator" meta-target will forward to the default allocator according 21 # This "allocator" meta-target will forward to the default allocator according
20 # to the build settings. 22 # to the build settings.
21 group("allocator") { 23 group("allocator") {
22 if (!is_nacl) { 24 public_deps = []
23 deps = [] 25 if (use_allocator == "tcmalloc") {
26 public_deps += [ ":tcmalloc" ]
27 }
24 28
25 if (use_allocator == "tcmalloc") { 29 # This condition expresses the win_use_allocator_shim in the GYP build.
26 deps += [ ":tcmalloc" ] 30 if (is_win && !is_component_build && visual_studio_version != "2015") {
27 } 31 public_deps += [ ":allocator_shim" ]
28 32 }
29 # This condition expresses the win_use_allocator_shim in the GYP build.
30 if (is_win && !is_component_build && visual_studio_version != "2015") {
31 deps += [ ":allocator_shim" ]
32 all_dependent_configs = [ ":nocmt" ]
33 }
34 } # !is_nacl
35 } 33 }
36 34
37 # This config defines ALLOCATOR_SHIM in the same conditions that the allocator 35 # This config defines ALLOCATOR_SHIM in the same conditions that the allocator
38 # shim will be used by the allocator target. 36 # shim will be used by the allocator target.
39 # 37 #
40 # TODO(brettw) this is only used in one place and is kind of mess, because it 38 # TODO(brettw) this is only used in one place and is kind of mess, because it
41 # assumes that the library using it will eventually be linked with 39 # assumes that the library using it will eventually be linked with
42 # //base/allocator in the default way. Clean this up and delete this. 40 # //base/allocator in the default way. Clean this up and delete this.
43 config("allocator_shim_define") { 41 config("allocator_shim_define") {
44 if (is_win && !is_component_build && visual_studio_version != "2015") { 42 if (is_win && !is_component_build && visual_studio_version != "2015") {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 ] 100 ]
103 } 101 }
104 102
105 source_set("allocator_shim") { 103 source_set("allocator_shim") {
106 sources = [ 104 sources = [
107 "allocator_shim_win.cc", 105 "allocator_shim_win.cc",
108 ] 106 ]
109 configs -= [ "//build/config/compiler:chromium_code" ] 107 configs -= [ "//build/config/compiler:chromium_code" ]
110 configs += [ "//build/config/compiler:no_chromium_code" ] 108 configs += [ "//build/config/compiler:no_chromium_code" ]
111 109
110 public_configs = [ ":nocmt" ]
112 deps = [ 111 deps = [
113 ":prep_libc", 112 ":prep_libc",
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 source_set("tcmalloc") { 121 source_set("tcmalloc") {
122 tcmalloc_dir = "//third_party/tcmalloc/chromium" 122 tcmalloc_dir = "//third_party/tcmalloc/chromium"
123 123
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 # 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
284 # we"re in release mode. 284 # we"re in release mode.
285 if (!is_debug) { 285 if (!is_debug) {
286 configs -= [ "//build/config/compiler:default_optimization" ] 286 configs -= [ "//build/config/compiler:default_optimization" ]
287 configs += [ "//build/config/compiler:optimize_max" ] 287 configs += [ "//build/config/compiler:optimize_max" ]
288 } 288 }
289 289
290 deps += [ "//base/third_party/dynamic_annotations" ] 290 deps += [ "//base/third_party/dynamic_annotations" ]
291 } 291 }
292 } # use_allocator == "tcmalloc" 292 } # use_allocator == "tcmalloc"
OLDNEW
« no previous file with comments | « base/BUILD.gn ('k') | base/allocator/allocator.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698