Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / 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-branch-combine.cc',
57         'compiler/test-changes-lowering.cc',
58         'compiler/test-codegen-deopt.cc',
59         'compiler/test-gap-resolver.cc',
60         'compiler/test-graph-reducer.cc',
61         'compiler/test-instruction.cc',
62         'compiler/test-js-context-specialization.cc',
63         'compiler/test-js-constant-cache.cc',
64         'compiler/test-js-typed-lowering.cc',
65         'compiler/test-linkage.cc',
66         'compiler/test-machine-operator-reducer.cc',
67         'compiler/test-node-algorithm.cc',
68         'compiler/test-node-cache.cc',
69         'compiler/test-node.cc',
70         'compiler/test-operator.cc',
71         'compiler/test-phi-reducer.cc',
72         'compiler/test-pipeline.cc',
73         'compiler/test-representation-change.cc',
74         'compiler/test-run-deopt.cc',
75         'compiler/test-run-inlining.cc',
76         'compiler/test-run-intrinsics.cc',
77         'compiler/test-run-jsbranches.cc',
78         'compiler/test-run-jscalls.cc',
79         'compiler/test-run-jsexceptions.cc',
80         'compiler/test-run-jsops.cc',
81         'compiler/test-run-machops.cc',
82         'compiler/test-run-properties.cc',
83         'compiler/test-run-variables.cc',
84         'compiler/test-schedule.cc',
85         'compiler/test-scheduler.cc',
86         'compiler/test-simplified-lowering.cc',
87         'cctest.cc',
88         'gay-fixed.cc',
89         'gay-precision.cc',
90         'gay-shortest.cc',
91         'print-extension.cc',
92         'profiler-extension.cc',
93         'test-accessors.cc',
94         'test-alloc.cc',
95         'test-api.cc',
96         'test-ast.cc',
97         'test-atomicops.cc',
98         'test-bignum.cc',
99         'test-bignum-dtoa.cc',
100         'test-checks.cc',
101         'test-circular-queue.cc',
102         'test-compiler.cc',
103         'test-constantpool.cc',
104         'test-conversions.cc',
105         'test-cpu-profiler.cc',
106         'test-dataflow.cc',
107         'test-date.cc',
108         'test-debug.cc',
109         'test-declarative-accessors.cc',
110         'test-decls.cc',
111         'test-deoptimization.cc',
112         'test-dictionary.cc',
113         'test-diy-fp.cc',
114         'test-double.cc',
115         'test-dtoa.cc',
116         'test-fast-dtoa.cc',
117         'test-fixed-dtoa.cc',
118         'test-flags.cc',
119         'test-func-name-inference.cc',
120         'test-gc-tracer.cc',
121         'test-global-handles.cc',
122         'test-global-object.cc',
123         'test-hashing.cc',
124         'test-hashmap.cc',
125         'test-heap.cc',
126         'test-heap-profiler.cc',
127         'test-hydrogen-types.cc',
128         'test-list.cc',
129         'test-liveedit.cc',
130         'test-lockers.cc',
131         'test-log.cc',
132         'test-microtask-delivery.cc',
133         'test-mark-compact.cc',
134         'test-mementos.cc',
135         'test-object-observe.cc',
136         'test-ordered-hash-table.cc',
137         'test-ostreams.cc',
138         'test-parsing.cc',
139         'test-platform.cc',
140         'test-profile-generator.cc',
141         'test-random-number-generator.cc',
142         'test-regexp.cc',
143         'test-reloc-info.cc',
144         'test-representation.cc',
145         'test-serialize.cc',
146         'test-spaces.cc',
147         'test-strings.cc',
148         'test-symbols.cc',
149         'test-strtod.cc',
150         'test-thread-termination.cc',
151         'test-threads.cc',
152         'test-types.cc',
153         'test-unbound-queue.cc',
154         'test-unique.cc',
155         'test-unscopables-hidden-prototype.cc',
156         'test-utils.cc',
157         'test-version.cc',
158         'test-weakmaps.cc',
159         'test-weaksets.cc',
160         'test-weaktypedarrays.cc',
161         'trace-extension.cc'
162       ],
163       'conditions': [
164         ['v8_target_arch=="ia32"', {
165           'sources': [  ### gcmole(arch:ia32) ###
166             'test-assembler-ia32.cc',
167             'test-code-stubs.cc',
168             'test-code-stubs-ia32.cc',
169             'test-disasm-ia32.cc',
170             'test-macro-assembler-ia32.cc',
171             'test-log-stack-tracer.cc'
172           ],
173         }],
174         ['v8_target_arch=="x64"', {
175           'sources': [  ### gcmole(arch:x64) ###
176             'test-assembler-x64.cc',
177             'test-code-stubs.cc',
178             'test-code-stubs-x64.cc',
179             'test-disasm-x64.cc',
180             'test-macro-assembler-x64.cc',
181             'test-log-stack-tracer.cc'
182           ],
183         }],
184         ['v8_target_arch=="arm"', {
185           'sources': [  ### gcmole(arch:arm) ###
186             'test-assembler-arm.cc',
187             'test-code-stubs.cc',
188             'test-code-stubs-arm.cc',
189             'test-disasm-arm.cc',
190             'test-macro-assembler-arm.cc'
191           ],
192         }],
193         ['v8_target_arch=="arm64"', {
194           'sources': [  ### gcmole(arch:arm64) ###
195             'test-utils-arm64.cc',
196             'test-assembler-arm64.cc',
197             'test-code-stubs.cc',
198             'test-code-stubs-arm64.cc',
199             'test-disasm-arm64.cc',
200             'test-fuzz-arm64.cc',
201             'test-javascript-arm64.cc',
202             'test-js-arm64-variables.cc'
203           ],
204         }],
205         ['v8_target_arch=="mipsel"', {
206           'sources': [  ### gcmole(arch:mipsel) ###
207             'test-assembler-mips.cc',
208             'test-code-stubs.cc',
209             'test-code-stubs-mips.cc',
210             'test-disasm-mips.cc',
211             'test-macro-assembler-mips.cc'
212           ],
213         }],
214         ['v8_target_arch=="mips64el"', {
215           'sources': [
216             'test-assembler-mips64.cc',
217             'test-code-stubs.cc',
218             'test-code-stubs-mips64.cc',
219             'test-disasm-mips64.cc',
220             'test-macro-assembler-mips64.cc'
221           ],
222         }],
223         ['v8_target_arch=="x87"', {
224           'sources': [  ### gcmole(arch:x87) ###
225             'test-assembler-x87.cc',
226             'test-code-stubs.cc',
227             'test-code-stubs-x87.cc',
228             'test-disasm-x87.cc',
229             'test-macro-assembler-x87.cc',
230             'test-log-stack-tracer.cc'
231           ],
232         }],
233         [ 'OS=="linux" or OS=="qnx"', {
234           'sources': [
235             'test-platform-linux.cc',
236           ],
237         }],
238         [ 'OS=="win"', {
239           'sources': [
240             'test-platform-win32.cc',
241           ],
242           'msvs_settings': {
243             'VCCLCompilerTool': {
244               # MSVS wants this for gay-{precision,shortest}.cc.
245               'AdditionalOptions': ['/bigobj'],
246             },
247           },
248         }],
249         ['component=="shared_library"', {
250           # cctest can't be built against a shared library, so we need to
251           # depend on the underlying static target in that case.
252           'conditions': [
253             ['v8_use_snapshot=="true"', {
254               'dependencies': ['../../tools/gyp/v8.gyp:v8_snapshot'],
255             },
256             {
257               'dependencies': [
258                 '../../tools/gyp/v8.gyp:v8_nosnapshot',
259               ],
260             }],
261           ],
262         }, {
263           'dependencies': ['../../tools/gyp/v8.gyp:v8'],
264         }],
265       ],
266     },
267     {
268       'target_name': 'resources',
269       'type': 'none',
270       'variables': {
271         'file_list': [
272            '../../tools/splaytree.js',
273            '../../tools/codemap.js',
274            '../../tools/csvparser.js',
275            '../../tools/consarray.js',
276            '../../tools/profile.js',
277            '../../tools/profile_view.js',
278            '../../tools/logreader.js',
279            'log-eq-of-logging-and-traversal.js',
280         ],
281       },
282       'actions': [
283         {
284           'action_name': 'js2c',
285           'inputs': [
286             '../../tools/js2c.py',
287             '<@(file_list)',
288           ],
289           'outputs': [
290             '<(generated_file)',
291           ],
292           'action': [
293             'python',
294             '../../tools/js2c.py',
295             '<@(_outputs)',
296             'TEST',  # type
297             'off',  # compression
298             '<@(file_list)',
299           ],
300         }
301       ],
302     },
303   ],
304 }