OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 { | 5 { |
6 'target_defaults': { | 6 'target_defaults': { |
7 'variables': { | 7 'variables': { |
8 # This code gets run a lot and debugged rarely, so it should be fast | 8 # This code gets run a lot and debugged rarely, so it should be fast |
9 # by default. See http://crbug.com/388949. | 9 # by default. See http://crbug.com/388949. |
10 'debug_optimize': '2', | 10 'debug_optimize': '2', |
(...skipping 14 matching lines...) Expand all Loading... |
25 # Only executables and not libraries should depend on the | 25 # Only executables and not libraries should depend on the |
26 # allocator target; only the application (the final executable) | 26 # allocator target; only the application (the final executable) |
27 # knows what allocator makes sense. | 27 # knows what allocator makes sense. |
28 { | 28 { |
29 'target_name': 'allocator', | 29 'target_name': 'allocator', |
30 # TODO(primiano): This should be type: none for the noop cases (an empty | 30 # TODO(primiano): This should be type: none for the noop cases (an empty |
31 # static lib can confuse some gyp generators). Fix it once the refactoring | 31 # static lib can confuse some gyp generators). Fix it once the refactoring |
32 # (crbug.com/564618) bring this file to a saner state (fewer conditions). | 32 # (crbug.com/564618) bring this file to a saner state (fewer conditions). |
33 'type': 'static_library', | 33 'type': 'static_library', |
34 'conditions': [ | 34 'conditions': [ |
35 # TODO(primiano): in next CL this should check win_use_allocator_shim. | 35 ['OS=="win" and win_use_allocator_shim==1', { |
36 # Right now that would produce a non-zero ninja diff for asan=1. | |
37 ['OS=="win" and component!="shared_library"', { | |
38 'msvs_settings': { | 36 'msvs_settings': { |
39 # TODO(sgk): merge this with build/common.gypi settings | 37 # TODO(sgk): merge this with build/common.gypi settings |
40 'VCLibrarianTool': { | 38 'VCLibrarianTool': { |
41 'AdditionalOptions': ['/ignore:4006,4221'], | 39 'AdditionalOptions': ['/ignore:4006,4221'], |
42 }, | 40 }, |
43 'VCLinkerTool': { | 41 'VCLinkerTool': { |
44 'AdditionalOptions': ['/ignore:4006'], | 42 'AdditionalOptions': ['/ignore:4006'], |
45 }, | 43 }, |
46 }, | 44 }, |
47 'dependencies': [ | 45 'dependencies': [ |
48 'libcmt', | 46 'libcmt', |
49 | |
50 # TODO(primiano): remove in next CL, not really needed. | |
51 '../third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_
annotations', | |
52 ], | 47 ], |
53 'include_dirs': [ | 48 'include_dirs': [ |
54 '.', # TODO(primiano): remove in next CL, not really needed. | |
55 '../..', | 49 '../..', |
56 ], | 50 ], |
57 'sources': [ | 51 'sources': [ |
58 'allocator_shim_win.cc', | 52 'allocator_shim_win.cc', |
59 ], | 53 ], |
60 'configurations': { | 54 'configurations': { |
61 'Debug_Base': { | 55 'Debug_Base': { |
62 'msvs_settings': { | 56 'msvs_settings': { |
63 'VCCLCompilerTool': { | 57 'VCCLCompilerTool': { |
64 'RuntimeLibrary': '0', | 58 'RuntimeLibrary': '0', |
65 }, | 59 }, |
66 }, | 60 }, |
67 # TODO(primiano): remove this 'conditions' section soon. This is | |
68 # only for tc-malloc, which is not supported on windows. The only | |
69 # reason os it is to make the initial refactoring easier and | |
70 # a zero-diff ninja w.r.t. the current situation. | |
71 'conditions': [ | |
72 ['disable_debugallocation==0', { | |
73 'defines': [ 'TCMALLOC_FOR_DEBUGALLOCATION' ], | |
74 }], | |
75 ], | |
76 }, | 61 }, |
77 }, | 62 }, |
78 'direct_dependent_settings': { | 63 'direct_dependent_settings': { |
79 'configurations': { | 64 'configurations': { |
80 'Common_Base': { | 65 'Common_Base': { |
81 'msvs_settings': { | 66 'msvs_settings': { |
82 'VCLinkerTool': { | 67 'VCLinkerTool': { |
83 'IgnoreDefaultLibraryNames': ['libcmtd.lib', 'libcmt.lib'], | 68 'IgnoreDefaultLibraryNames': ['libcmtd.lib', 'libcmt.lib'], |
84 'AdditionalDependencies': [ | 69 'AdditionalDependencies': [ |
85 '<(SHARED_INTERMEDIATE_DIR)/allocator/libcmt.lib' | 70 '<(SHARED_INTERMEDIATE_DIR)/allocator/libcmt.lib' |
86 ], | 71 ], |
87 }, | 72 }, |
88 }, | 73 }, |
89 }, | 74 }, |
90 }, | 75 }, |
91 'defines': [ | |
92 'PERFTOOLS_DLL_DECL=', | |
93 ], | |
94 }, | 76 }, |
95 }], # OS=="win" | 77 }], # OS=="win" |
96 ['use_allocator=="tcmalloc"', { | 78 ['use_allocator=="tcmalloc"', { |
97 # Disable the heap checker in tcmalloc. | 79 # Disable the heap checker in tcmalloc. |
98 'defines': [ | 80 'defines': [ |
99 'NO_HEAP_CHECK', | 81 'NO_HEAP_CHECK', |
100 ], | 82 ], |
101 'dependencies': [ | 83 'dependencies': [ |
102 '../third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_
annotations', | 84 '../third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_
annotations', |
103 ], | 85 ], |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 'configurations': { | 414 'configurations': { |
433 'Common_Base': { | 415 'Common_Base': { |
434 'msvs_target_platform': 'x64', | 416 'msvs_target_platform': 'x64', |
435 }, | 417 }, |
436 }, | 418 }, |
437 }, | 419 }, |
438 ], | 420 ], |
439 }], | 421 }], |
440 ], | 422 ], |
441 } | 423 } |
OLD | NEW |