Chromium Code Reviews| Index: base/allocator/BUILD.gn |
| diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn |
| index 9fdb9566e3498f79aef3c2c6e6377dc356899c7d..a0e657414aee562834c15334ab792303d6c88f04 100644 |
| --- a/base/allocator/BUILD.gn |
| +++ b/base/allocator/BUILD.gn |
| @@ -6,10 +6,6 @@ import("//build/buildflag_header.gni") |
| import("//build/config/allocator.gni") |
| import("//build/config/compiler/compiler.gni") |
| -if (is_win) { |
| - import("//build/config/win/visual_studio_version.gni") |
| -} |
| - |
| declare_args() { |
| # Provide a way to force disable debugallocation in Debug builds, |
| # e.g. for profiling (it's more rare to profile Debug builds, |
| @@ -20,6 +16,7 @@ declare_args() { |
| # This "allocator" meta-target will forward to the default allocator according |
| # to the build settings. |
| group("allocator") { |
| + public_deps = [] |
| deps = [] |
| if (use_allocator == "tcmalloc") { |
| @@ -27,9 +24,8 @@ group("allocator") { |
| } |
| # This condition expresses the win_use_allocator_shim in the GYP build. |
| - if (is_win && !is_component_build && visual_studio_version != "2015") { |
| - deps += [ ":allocator_shim" ] |
| - all_dependent_configs = [ ":nocmt" ] |
| + if (is_win && !is_component_build && !is_debug) { |
|
Nico
2016/03/28 20:45:48
since this is repeated below, should it go into so
Will Harris
2016/03/29 18:23:51
Done.
|
| + public_deps += [ ":allocator_shim" ] |
| } |
| } |
| @@ -40,7 +36,7 @@ group("allocator") { |
| # assumes that the library using it will eventually be linked with |
| # //base/allocator in the default way. Clean this up and delete this. |
| config("allocator_shim_define") { |
| - if (is_win && !is_component_build && visual_studio_version != "2015") { |
| + if (is_win && !is_component_build && !is_debug) { |
| defines = [ "ALLOCATOR_SHIM" ] |
| } |
| } |
| @@ -76,46 +72,15 @@ config("tcmalloc_flags") { |
| } |
| } |
| -# This config and libc modification are only used on Windows. |
| -if (is_win) { |
| - config("nocmt") { |
| - ldflags = [ |
| - "/NODEFAULTLIB:libcmt", |
| - "/NODEFAULTLIB:libcmtd", |
| +# This config is only used on Windows static release builds for the |
| +# allocator shim. |
| +if (is_win && !is_component_build && !is_debug) { |
| + source_set("allocator_shim") { |
| + sources = [ |
| + "allocator_shim_win.cc", |
| + "allocator_shim_win.h", |
| ] |
| - libs = [ rebase_path("$target_gen_dir/allocator/libcmt.lib") ] |
| - } |
| - |
| - if (!is_component_build && visual_studio_version != "2015") { |
| - action("prep_libc") { |
| - script = "prep_libc.py" |
| - outputs = [ |
| - "$target_gen_dir/allocator/libcmt.lib", |
| - ] |
| - args = [ |
| - visual_studio_path + "/vc/lib", |
| - rebase_path("$target_gen_dir/allocator"), |
| - current_cpu, |
| - |
| - # The environment file in the build directory. This is required because |
| - # the Windows toolchain setup saves the VC paths and such so that |
| - # running "mc.exe" will work with the configured toolchain. This file |
| - # is in the root build dir. |
| - "environment.$current_cpu", |
| - ] |
| - } |
| - |
| - source_set("allocator_shim") { |
| - sources = [ |
| - "allocator_shim_win.cc", |
| - ] |
| - configs -= [ "//build/config/compiler:chromium_code" ] |
| - configs += [ "//build/config/compiler:no_chromium_code" ] |
| - |
| - deps = [ |
| - ":prep_libc", |
| - ] |
| - } |
| + configs += [ ":allocator_shim_define" ] |
| } |
| } |