deps: update v8 to 4.3.61.21
[platform/upstream/nodejs.git] / deps / v8 / test / cctest / cctest.gyp
1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are
4 # met:
5 #
6 #     * Redistributions of source code must retain the above copyright
7 #       notice, this list of conditions and the following disclaimer.
8 #     * Redistributions in binary form must reproduce the above
9 #       copyright notice, this list of conditions and the following
10 #       disclaimer in the documentation and/or other materials provided
11 #       with the distribution.
12 #     * Neither the name of Google Inc. nor the names of its
13 #       contributors may be used to endorse or promote products derived
14 #       from this software without specific prior written permission.
15 #
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28 {
29   'variables': {
30     'v8_code': 1,
31     'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
32   },
33   'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
34   'targets': [
35     {
36       'target_name': 'cctest',
37       'type': 'executable',
38       'dependencies': [
39         'resources',
40         '../../tools/gyp/v8.gyp:v8_libplatform',
41       ],
42       'include_dirs': [
43         '../..',
44       ],
45       'sources': [  ### gcmole(all) ###
46         '<(generated_file)',
47         'compiler/c-signature.h',
48         'compiler/codegen-tester.cc',
49         'compiler/codegen-tester.h',
50         'compiler/function-tester.h',
51         'compiler/graph-builder-tester.cc',
52         'compiler/graph-builder-tester.h',
53         'compiler/graph-tester.h',
54         'compiler/simplified-graph-builder.cc',
55         'compiler/simplified-graph-builder.h',
56         'compiler/test-basic-block-profiler.cc',
57         'compiler/test-branch-combine.cc',
58         'compiler/test-changes-lowering.cc',
59         'compiler/test-codegen-deopt.cc',
60         'compiler/test-control-reducer.cc',
61         'compiler/test-gap-resolver.cc',
62         'compiler/test-graph-visualizer.cc',
63         'compiler/test-instruction.cc',
64         'compiler/test-js-context-specialization.cc',
65         'compiler/test-js-constant-cache.cc',
66         'compiler/test-js-typed-lowering.cc',
67         'compiler/test-jump-threading.cc',
68         'compiler/test-linkage.cc',
69         'compiler/test-loop-assignment-analysis.cc',
70         'compiler/test-loop-analysis.cc',
71         'compiler/test-machine-operator-reducer.cc',
72         'compiler/test-node-algorithm.cc',
73         'compiler/test-node-cache.cc',
74         'compiler/test-node.cc',
75         'compiler/test-operator.cc',
76         'compiler/test-osr.cc',
77         'compiler/test-pipeline.cc',
78         'compiler/test-representation-change.cc',
79         'compiler/test-run-deopt.cc',
80         'compiler/test-run-inlining.cc',
81         'compiler/test-run-intrinsics.cc',
82         'compiler/test-run-jsbranches.cc',
83         'compiler/test-run-jscalls.cc',
84         'compiler/test-run-jsexceptions.cc',
85         'compiler/test-run-jsops.cc',
86         'compiler/test-run-machops.cc',
87         'compiler/test-run-properties.cc',
88         'compiler/test-run-stackcheck.cc',
89         'compiler/test-run-stubs.cc',
90         'compiler/test-run-variables.cc',
91         'compiler/test-simplified-lowering.cc',
92         'cctest.cc',
93         'gay-fixed.cc',
94         'gay-precision.cc',
95         'gay-shortest.cc',
96         'print-extension.cc',
97         'profiler-extension.cc',
98         'test-accessors.cc',
99         'test-alloc.cc',
100         'test-api.cc',
101         'test-api.h',
102         'test-api-interceptors.cc',
103         'test-array-list.cc',
104         'test-ast.cc',
105         'test-atomicops.cc',
106         'test-bignum.cc',
107         'test-bignum-dtoa.cc',
108         'test-bit-vector.cc',
109         'test-circular-queue.cc',
110         'test-compiler.cc',
111         'test-constantpool.cc',
112         'test-conversions.cc',
113         'test-cpu-profiler.cc',
114         'test-date.cc',
115         'test-debug.cc',
116         'test-decls.cc',
117         'test-deoptimization.cc',
118         'test-dictionary.cc',
119         'test-diy-fp.cc',
120         'test-double.cc',
121         'test-dtoa.cc',
122         'test-fast-dtoa.cc',
123         'test-feedback-vector.cc',
124         'test-fixed-dtoa.cc',
125         'test-flags.cc',
126         'test-func-name-inference.cc',
127         'test-gc-tracer.cc',
128         'test-global-handles.cc',
129         'test-global-object.cc',
130         'test-hashing.cc',
131         'test-hashmap.cc',
132         'test-heap.cc',
133         'test-heap-profiler.cc',
134         'test-hydrogen-types.cc',
135         'test-list.cc',
136         'test-liveedit.cc',
137         'test-lockers.cc',
138         'test-log.cc',
139         'test-microtask-delivery.cc',
140         'test-mark-compact.cc',
141         'test-mementos.cc',
142         'test-migrations.cc',
143         'test-object-observe.cc',
144         'test-ordered-hash-table.cc',
145         'test-parsing.cc',
146         'test-platform.cc',
147         'test-profile-generator.cc',
148         'test-random-number-generator.cc',
149         'test-regexp.cc',
150         'test-reloc-info.cc',
151         'test-representation.cc',
152         'test-sampler-api.cc',
153         'test-serialize.cc',
154         'test-spaces.cc',
155         'test-strings.cc',
156         'test-symbols.cc',
157         'test-strtod.cc',
158         'test-thread-termination.cc',
159         'test-threads.cc',
160         'test-transitions.cc',
161         'test-typedarrays.cc',
162         'test-types.cc',
163         'test-unbound-queue.cc',
164         'test-unboxed-doubles.cc',
165         'test-unique.cc',
166         'test-unscopables-hidden-prototype.cc',
167         'test-utils.cc',
168         'test-version.cc',
169         'test-weakmaps.cc',
170         'test-weaksets.cc',
171         'test-weaktypedarrays.cc',
172         'trace-extension.cc',
173         '../../src/startup-data-util.h',
174         '../../src/startup-data-util.cc'
175       ],
176       'conditions': [
177         ['v8_target_arch=="ia32"', {
178           'sources': [  ### gcmole(arch:ia32) ###
179             'test-assembler-ia32.cc',
180             'test-code-stubs.cc',
181             'test-code-stubs-ia32.cc',
182             'test-disasm-ia32.cc',
183             'test-macro-assembler-ia32.cc',
184             'test-log-stack-tracer.cc'
185           ],
186         }],
187         ['v8_target_arch=="x64"', {
188           'sources': [  ### gcmole(arch:x64) ###
189             'test-assembler-x64.cc',
190             'test-code-stubs.cc',
191             'test-code-stubs-x64.cc',
192             'test-disasm-x64.cc',
193             'test-macro-assembler-x64.cc',
194             'test-log-stack-tracer.cc'
195           ],
196         }],
197         ['v8_target_arch=="arm"', {
198           'sources': [  ### gcmole(arch:arm) ###
199             'test-assembler-arm.cc',
200             'test-code-stubs.cc',
201             'test-code-stubs-arm.cc',
202             'test-disasm-arm.cc',
203             'test-macro-assembler-arm.cc'
204           ],
205         }],
206         ['v8_target_arch=="arm64"', {
207           'sources': [  ### gcmole(arch:arm64) ###
208             'test-utils-arm64.cc',
209             'test-assembler-arm64.cc',
210             'test-code-stubs.cc',
211             'test-code-stubs-arm64.cc',
212             'test-disasm-arm64.cc',
213             'test-fuzz-arm64.cc',
214             'test-javascript-arm64.cc',
215             'test-js-arm64-variables.cc'
216           ],
217         }],
218         ['v8_target_arch=="ppc"', {
219           'sources': [  ### gcmole(arch:ppc) ###
220             'test-assembler-ppc.cc',
221             'test-code-stubs.cc',
222             'test-disasm-ppc.cc'
223           ],
224         }],
225         ['v8_target_arch=="ppc64"', {
226           'sources': [  ### gcmole(arch:ppc64) ###
227             'test-assembler-ppc.cc',
228             'test-code-stubs.cc',
229             'test-disasm-ppc.cc'
230           ],
231         }],
232         ['v8_target_arch=="mipsel"', {
233           'sources': [  ### gcmole(arch:mipsel) ###
234             'test-assembler-mips.cc',
235             'test-code-stubs.cc',
236             'test-code-stubs-mips.cc',
237             'test-disasm-mips.cc',
238             'test-macro-assembler-mips.cc'
239           ],
240         }],
241         ['v8_target_arch=="mips64el"', {
242           'sources': [
243             'test-assembler-mips64.cc',
244             'test-code-stubs.cc',
245             'test-code-stubs-mips64.cc',
246             'test-disasm-mips64.cc',
247             'test-macro-assembler-mips64.cc'
248           ],
249         }],
250         ['v8_target_arch=="x87"', {
251           'sources': [  ### gcmole(arch:x87) ###
252             'test-assembler-x87.cc',
253             'test-code-stubs.cc',
254             'test-code-stubs-x87.cc',
255             'test-disasm-x87.cc',
256             'test-macro-assembler-x87.cc',
257             'test-log-stack-tracer.cc'
258           ],
259         }],
260         [ 'OS=="linux" or OS=="qnx"', {
261           'sources': [
262             'test-platform-linux.cc',
263           ],
264         }],
265         [ 'OS=="win"', {
266           'sources': [
267             'test-platform-win32.cc',
268           ],
269           'msvs_settings': {
270             'VCCLCompilerTool': {
271               # MSVS wants this for gay-{precision,shortest}.cc.
272               'AdditionalOptions': ['/bigobj'],
273             },
274           },
275         }],
276         ['OS=="aix"', {
277           'ldflags': [ '-Wl,-bbigtoc' ],
278         }],
279         ['component=="shared_library"', {
280           # cctest can't be built against a shared library, so we need to
281           # depend on the underlying static target in that case.
282           'conditions': [
283             ['v8_use_snapshot=="true" and v8_use_external_startup_data==0', {
284               'dependencies': ['../../tools/gyp/v8.gyp:v8_snapshot'],
285             }],
286             ['v8_use_snapshot=="true" and v8_use_external_startup_data==1', {
287               'dependencies': ['../../tools/gyp/v8.gyp:v8_external_snapshot'],
288             }],
289             ['v8_use_snapshot!="true"', {
290               'dependencies': ['../../tools/gyp/v8.gyp:v8_nosnapshot'],
291             }],
292           ],
293         }, {
294           'dependencies': ['../../tools/gyp/v8.gyp:v8'],
295         }],
296       ],
297     },
298     {
299       'target_name': 'resources',
300       'type': 'none',
301       'variables': {
302         'file_list': [
303            '../../tools/splaytree.js',
304            '../../tools/codemap.js',
305            '../../tools/csvparser.js',
306            '../../tools/consarray.js',
307            '../../tools/profile.js',
308            '../../tools/profile_view.js',
309            '../../tools/logreader.js',
310            'log-eq-of-logging-and-traversal.js',
311         ],
312       },
313       'actions': [
314         {
315           'action_name': 'js2c',
316           'inputs': [
317             '../../tools/js2c.py',
318             '<@(file_list)',
319           ],
320           'outputs': [
321             '<(generated_file)',
322           ],
323           'action': [
324             'python',
325             '../../tools/js2c.py',
326             '<@(_outputs)',
327             'TEST',  # type
328             '<@(file_list)',
329           ],
330         }
331       ],
332     },
333   ],
334 }