Print stack traces in browser tests when any process crashes, or an assert fires.
[chromium-blink-merge.git] / courgette / courgette.gyp
blob8ff08bc85309bf28469f1952acd768743f3250b7
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'variables': {
7     'chromium_code': 1,
8     'courgette_lib_sources': [
9       'adjustment_method.cc',
10       'adjustment_method_2.cc',
11       'adjustment_method.h',
12       'assembly_program.cc',
13       'assembly_program.h',
14       'courgette.h',
15       'crc.cc',
16       'crc.h',
17       'difference_estimator.cc',
18       'difference_estimator.h',
19       'disassembler.cc',
20       'disassembler.h',
21       'disassembler_elf_32.cc',
22       'disassembler_elf_32.h',
23       'disassembler_elf_32_arm.cc',
24       'disassembler_elf_32_arm.h',
25       'disassembler_elf_32_x86.cc',
26       'disassembler_elf_32_x86.h',
27       'disassembler_win32_x86.cc',
28       'disassembler_win32_x86.h',
29       'disassembler_win32_x64.cc',
30       'disassembler_win32_x64.h',
31       'encoded_program.cc',
32       'encoded_program.h',
33       'ensemble.cc',
34       'ensemble.h',
35       'ensemble_apply.cc',
36       'ensemble_create.cc',
37       'memory_allocator.cc',
38       'memory_allocator.h',
39       'region.h',
40       'simple_delta.cc',
41       'simple_delta.h',
42       'streams.cc',
43       'streams.h',
44       'third_party/bsdiff.h',
45       'third_party/bsdiff_apply.cc',
46       'third_party/bsdiff_create.cc',
47       'third_party/paged_array.h',
48       'third_party/qsufsort.h',
49       'types_elf.h',
50       'types_win_pe.h',
51       'patch_generator_x86_32.h',
52       'patcher_x86_32.h',
53     ],
54   },
55   'targets': [
56     {
57       'target_name': 'courgette_lib',
58       'type': 'static_library',
59       'dependencies': [
60         '../base/base.gyp:base',
61         '../third_party/lzma_sdk/lzma_sdk.gyp:lzma_sdk',
62       ],
63       'sources': [
64         '<@(courgette_lib_sources)'
65       ],
66     },
67     {
68       'target_name': 'courgette',
69       'type': 'executable',
70       'sources': [
71         'courgette_tool.cc',
72       ],
73       'dependencies': [
74         'courgette_lib',
75         '../base/base.gyp:base',
76       ],
77       'msvs_settings': {
78         'VCLinkerTool': {
79           'LargeAddressAware': 2,
80         },
81       },
82     },
83     {
84       'target_name': 'courgette_minimal_tool',
85       'type': 'executable',
86       'sources': [
87         'courgette_minimal_tool.cc',
88       ],
89       'dependencies': [
90         'courgette_lib',
91         '../base/base.gyp:base',
92       ],
93     },
94     {
95       'target_name': 'courgette_unittests',
96       'type': 'executable',
97       'sources': [
98         'adjustment_method_unittest.cc',
99         'bsdiff_memory_unittest.cc',
100         'base_test_unittest.cc',
101         'base_test_unittest.h',
102         'difference_estimator_unittest.cc',
103         'disassembler_elf_32_x86_unittest.cc',
104         'disassembler_win32_x86_unittest.cc',
105         'disassembler_win32_x64_unittest.cc',
106         'encoded_program_unittest.cc',
107         'encode_decode_unittest.cc',
108         'ensemble_unittest.cc',
109         'memory_allocator_unittest.cc',
110         'streams_unittest.cc',
111         'typedrva_unittest.cc',
112         'versioning_unittest.cc',
113         'third_party/paged_array_unittest.cc',
114         'third_party/qsufsort_unittest.cc',
115       ],
116       'dependencies': [
117         'courgette_lib',
118         '../base/base.gyp:base',
119         '../base/base.gyp:base_i18n',
120         '../base/base.gyp:run_all_unittests',
121         '../base/base.gyp:test_support_base',
122         '../testing/gtest.gyp:gtest',
123       ],
124       'conditions': [
125         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
126           'conditions': [
127             ['use_allocator!="none"', {
128               'dependencies': [
129                 '../base/allocator/allocator.gyp:allocator',
130               ],
131             }],
132           ],
133         }],
134       ],
135       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
136       'msvs_disabled_warnings': [4267, ],
137     },
138     {
139       'target_name': 'courgette_fuzz',
140       'type': 'executable',
141       'sources': [
142         'base_test_unittest.cc',
143         'base_test_unittest.h',
144         'encoded_program_fuzz_unittest.cc',
145        ],
146       'dependencies': [
147         'courgette_lib',
148         '../base/base.gyp:base',
149         '../base/base.gyp:base_i18n',
150         '../base/base.gyp:test_support_base',
151         '../testing/gtest.gyp:gtest',
152       ],
153     },
154   ],
155   'conditions': [
156     ['OS=="win" and target_arch=="ia32"', {
157       'targets': [
158         {
159           'target_name': 'courgette_lib64',
160           'type': 'static_library',
161           'dependencies': [
162             '../base/base.gyp:base_win64',
163             '../third_party/lzma_sdk/lzma_sdk.gyp:lzma_sdk64',
164           ],
165           'sources': [
166             '<@(courgette_lib_sources)',
167           ],
168           'configurations': {
169             'Common_Base': {
170               'msvs_target_platform': 'x64',
171             },
172           },
173         },
174         {
175           'target_name': 'courgette64',
176           'type': 'executable',
177           'sources': [
178             'courgette_tool.cc',
179           ],
180           'dependencies': [
181             'courgette_lib64',
182             '../base/base.gyp:base_win64',
183           ],
184           'configurations': {
185             'Common_Base': {
186               'msvs_target_platform': 'x64',
187             },
188           },
189         },
190       ],
191     }],
192     # The build infrastructure needs courgette to be named courgette64.
193     ['OS=="win" and target_arch=="x64"', {
194       'targets': [
195         {
196           'target_name': 'courgette64',
197           'type': 'none',
198           'dependencies': [
199             'courgette',
200           ],
201           'actions': [{
202             'action_name': 'courgette64',
203             'inputs': [
204               '<(PRODUCT_DIR)/courgette.exe',
205             ],
206             'outputs': [
207               '<(PRODUCT_DIR)/courgette64.exe',
208             ],
209             'action': [
210               'python',
211               '../build/cp.py',
212               '<@(_inputs)',
213               '<@(_outputs)'
214             ],
215           }],
216         },
217       ],
218     }],
219     ['test_isolation_mode != "noop"', {
220       'targets': [
221         {
222           'target_name': 'courgette_unittests_run',
223           'type': 'none',
224           'dependencies': [
225             'courgette_unittests',
226           ],
227           'includes': [
228             '../build/isolate.gypi',
229           ],
230           'sources': [
231             'courgette_unittests.isolate',
232           ],
233         },
234       ],
235     }],
236   ],