blob: 9ef2d9bfb2830cf6a7e3341bf4f94e20559428e7 [file] [log] [blame]
Ben Murdoch3ef787d2012-04-12 10:51:47 +01001# Copyright 2012 the V8 project authors. All rights reserved.
Ben Murdochb0fe1622011-05-05 13:52:32 +01002# 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{
Ben Murdoch3fb3ca82011-12-02 17:19:32 +000029 'variables': {
Ben Murdochb8a8cc12014-11-26 15:28:44 +000030 'v8_code': 1,
Ben Murdoch3fb3ca82011-12-02 17:19:32 +000031 'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010032 },
Ben Murdochb8a8cc12014-11-26 15:28:44 +000033 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
Ben Murdochb0fe1622011-05-05 13:52:32 +010034 'targets': [
35 {
36 'target_name': 'cctest',
37 'type': 'executable',
38 'dependencies': [
Ben Murdoch3fb3ca82011-12-02 17:19:32 +000039 'resources',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000040 '../../tools/gyp/v8.gyp:v8_libplatform',
Ben Murdochb0fe1622011-05-05 13:52:32 +010041 ],
42 'include_dirs': [
Ben Murdochb8a8cc12014-11-26 15:28:44 +000043 '../..',
Ben Murdochb0fe1622011-05-05 13:52:32 +010044 ],
Ben Murdochb8a8cc12014-11-26 15:28:44 +000045 'sources': [ ### gcmole(all) ###
Ben Murdoch3fb3ca82011-12-02 17:19:32 +000046 '<(generated_file)',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000047 'compiler/c-signature.h',
48 'compiler/codegen-tester.cc',
49 'compiler/codegen-tester.h',
50 'compiler/function-tester.h',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000051 'compiler/graph-builder-tester.h',
Emily Bernierd0a1eb72015-03-24 16:35:39 -040052 'compiler/test-basic-block-profiler.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000053 'compiler/test-branch-combine.cc',
54 'compiler/test-changes-lowering.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000055 'compiler/test-code-stub-assembler.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000056 'compiler/test-gap-resolver.cc',
Emily Bernierd0a1eb72015-03-24 16:35:39 -040057 'compiler/test-graph-visualizer.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000058 'compiler/test-instruction.cc',
59 'compiler/test-js-context-specialization.cc',
60 'compiler/test-js-constant-cache.cc',
61 'compiler/test-js-typed-lowering.cc',
Emily Bernierd0a1eb72015-03-24 16:35:39 -040062 'compiler/test-jump-threading.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000063 'compiler/test-linkage.cc',
Emily Bernierd0a1eb72015-03-24 16:35:39 -040064 'compiler/test-loop-assignment-analysis.cc',
65 'compiler/test-loop-analysis.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000066 'compiler/test-machine-operator-reducer.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000067 'compiler/test-multiple-return.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000068 'compiler/test-node.cc',
69 'compiler/test-operator.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000070 'compiler/test-osr.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000071 'compiler/test-pipeline.cc',
72 'compiler/test-representation-change.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000073 'compiler/test-run-bytecode-graph-builder.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000074 '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',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000080 'compiler/test-run-jsobjects.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000081 'compiler/test-run-jsops.cc',
82 'compiler/test-run-machops.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000083 'compiler/test-run-native-calls.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000084 'compiler/test-run-properties.cc',
Emily Bernierd0a1eb72015-03-24 16:35:39 -040085 'compiler/test-run-stackcheck.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000086 'compiler/test-run-stubs.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000087 'compiler/test-run-variables.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000088 'compiler/test-simplified-lowering.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010089 'cctest.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000090 'expression-type-collector.cc',
91 'expression-type-collector.h',
92 'interpreter/test-bytecode-generator.cc',
93 'interpreter/test-interpreter.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010094 'gay-fixed.cc',
95 'gay-precision.cc',
96 'gay-shortest.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000097 'heap/heap-tester.h',
98 'heap/test-alloc.cc',
99 'heap/test-compaction.cc',
100 'heap/test-heap.cc',
101 'heap/test-incremental-marking.cc',
102 'heap/test-lab.cc',
103 'heap/test-mark-compact.cc',
104 'heap/test-spaces.cc',
105 'heap/utils-inl.h',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000106 'print-extension.cc',
107 'profiler-extension.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100108 'test-accessors.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100109 'test-api.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000110 'test-api.h',
111 'test-api-accessors.cc',
112 'test-api-interceptors.cc',
113 'test-api-fast-accessor-builder.cc',
114 'test-array-list.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100115 'test-ast.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000116 'test-ast-expression-visitor.cc',
117 'test-asm-validator.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000118 'test-atomicops.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100119 'test-bignum.cc',
120 'test-bignum-dtoa.cc',
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400121 'test-bit-vector.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100122 'test-circular-queue.cc',
123 'test-compiler.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000124 'test-constantpool.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100125 'test-conversions.cc',
126 'test-cpu-profiler.cc',
Ben Murdoch3ef787d2012-04-12 10:51:47 +0100127 'test-date.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100128 'test-debug.cc',
129 'test-decls.cc',
130 'test-deoptimization.cc',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000131 'test-dictionary.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100132 'test-diy-fp.cc',
133 'test-double.cc',
134 'test-dtoa.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000135 'test-elements-kind.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100136 'test-fast-dtoa.cc',
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400137 'test-feedback-vector.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000138 'test-field-type-tracking.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100139 'test-fixed-dtoa.cc',
140 'test-flags.cc',
141 'test-func-name-inference.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000142 'test-gc-tracer.cc',
143 'test-global-handles.cc',
144 'test-global-object.cc',
Ben Murdoch3ef787d2012-04-12 10:51:47 +0100145 'test-hashing.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100146 'test-hashmap.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100147 'test-heap-profiler.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000148 'test-hydrogen-types.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000149 'test-identity-map.cc',
150 'test-inobject-slack-tracking.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100151 'test-list.cc',
152 'test-liveedit.cc',
Ben Murdoch257744e2011-11-30 15:57:28 +0000153 'test-lockers.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100154 'test-log.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000155 'test-microtask-delivery.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000156 'test-mementos.cc',
157 'test-object-observe.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100158 'test-parsing.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000159 'test-platform.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100160 'test-profile-generator.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000161 'test-random-number-generator.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000162 'test-receiver-check-hidden-prototype.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100163 'test-regexp.cc',
164 'test-reloc-info.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000165 'test-representation.cc',
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400166 'test-sampler-api.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100167 'test-serialize.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000168 'test-simd.cc',
169 'test-slots-buffer.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100170 'test-strings.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000171 'test-symbols.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100172 'test-strtod.cc',
173 'test-thread-termination.cc',
174 'test-threads.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000175 'test-trace-event.cc',
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400176 'test-transitions.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000177 'test-typedarrays.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000178 'test-types.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000179 'test-typing-reset.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100180 'test-unbound-queue.cc',
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400181 'test-unboxed-doubles.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000182 'test-unique.cc',
183 'test-unscopables-hidden-prototype.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100184 'test-utils.cc',
Ben Murdoch3ef787d2012-04-12 10:51:47 +0100185 'test-version.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000186 'test-weakmaps.cc',
187 'test-weaksets.cc',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000188 'trace-extension.cc',
189 'wasm/test-run-wasm.cc',
190 'wasm/test-run-wasm-js.cc',
191 'wasm/test-run-wasm-module.cc',
192 'wasm/test-signatures.h',
193 'wasm/wasm-run-utils.h',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100194 ],
195 'conditions': [
196 ['v8_target_arch=="ia32"', {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000197 'sources': [ ### gcmole(arch:ia32) ###
Ben Murdochb0fe1622011-05-05 13:52:32 +0100198 'test-assembler-ia32.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000199 'test-code-stubs.cc',
200 'test-code-stubs-ia32.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100201 'test-disasm-ia32.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000202 'test-macro-assembler-ia32.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100203 'test-log-stack-tracer.cc'
204 ],
205 }],
206 ['v8_target_arch=="x64"', {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000207 'sources': [ ### gcmole(arch:x64) ###
Ben Murdochb0fe1622011-05-05 13:52:32 +0100208 'test-assembler-x64.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000209 'test-code-stubs.cc',
210 'test-code-stubs-x64.cc',
211 'test-disasm-x64.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100212 'test-macro-assembler-x64.cc',
213 'test-log-stack-tracer.cc'
214 ],
215 }],
216 ['v8_target_arch=="arm"', {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000217 'sources': [ ### gcmole(arch:arm) ###
Ben Murdochb0fe1622011-05-05 13:52:32 +0100218 'test-assembler-arm.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000219 'test-code-stubs.cc',
220 'test-code-stubs-arm.cc',
221 'test-disasm-arm.cc',
222 'test-macro-assembler-arm.cc'
Ben Murdochb0fe1622011-05-05 13:52:32 +0100223 ],
224 }],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000225 ['v8_target_arch=="arm64"', {
226 'sources': [ ### gcmole(arch:arm64) ###
227 'test-utils-arm64.cc',
228 'test-assembler-arm64.cc',
229 'test-code-stubs.cc',
230 'test-code-stubs-arm64.cc',
231 'test-disasm-arm64.cc',
232 'test-fuzz-arm64.cc',
233 'test-javascript-arm64.cc',
234 'test-js-arm64-variables.cc'
235 ],
236 }],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000237 ['v8_target_arch=="ppc"', {
238 'sources': [ ### gcmole(arch:ppc) ###
239 'test-assembler-ppc.cc',
240 'test-code-stubs.cc',
241 'test-disasm-ppc.cc'
242 ],
243 }],
244 ['v8_target_arch=="ppc64"', {
245 'sources': [ ### gcmole(arch:ppc64) ###
246 'test-assembler-ppc.cc',
247 'test-code-stubs.cc',
248 'test-disasm-ppc.cc'
249 ],
250 }],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000251 ['v8_target_arch=="mipsel"', {
252 'sources': [ ### gcmole(arch:mipsel) ###
Ben Murdochb0fe1622011-05-05 13:52:32 +0100253 'test-assembler-mips.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000254 'test-code-stubs.cc',
255 'test-code-stubs-mips.cc',
Ben Murdoch257744e2011-11-30 15:57:28 +0000256 'test-disasm-mips.cc',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000257 'test-macro-assembler-mips.cc'
Ben Murdochb0fe1622011-05-05 13:52:32 +0100258 ],
259 }],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000260 ['v8_target_arch=="mips64el"', {
261 'sources': [
262 'test-assembler-mips64.cc',
263 'test-code-stubs.cc',
264 'test-code-stubs-mips64.cc',
265 'test-disasm-mips64.cc',
266 'test-macro-assembler-mips64.cc'
267 ],
268 }],
269 ['v8_target_arch=="x87"', {
270 'sources': [ ### gcmole(arch:x87) ###
271 'test-assembler-x87.cc',
272 'test-code-stubs.cc',
273 'test-code-stubs-x87.cc',
274 'test-disasm-x87.cc',
275 'test-macro-assembler-x87.cc',
276 'test-log-stack-tracer.cc'
277 ],
278 }],
279 [ 'OS=="linux" or OS=="qnx"', {
Ben Murdochb0fe1622011-05-05 13:52:32 +0100280 'sources': [
281 'test-platform-linux.cc',
282 ],
283 }],
Ben Murdochb0fe1622011-05-05 13:52:32 +0100284 [ 'OS=="win"', {
285 'sources': [
286 'test-platform-win32.cc',
287 ],
Ben Murdoch3ef787d2012-04-12 10:51:47 +0100288 'msvs_settings': {
289 'VCCLCompilerTool': {
290 # MSVS wants this for gay-{precision,shortest}.cc.
291 'AdditionalOptions': ['/bigobj'],
292 },
293 },
Ben Murdochb0fe1622011-05-05 13:52:32 +0100294 }],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000295 ['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', {
296 # disable fmadd/fmsub so that expected results match generated code in
297 # RunFloat64MulAndFloat64Add1 and friends.
298 'cflags': ['-ffp-contract=off'],
299 }],
300 ['OS=="aix"', {
301 'ldflags': [ '-Wl,-bbigtoc' ],
302 }],
Ben Murdoch589d6972011-11-30 16:04:58 +0000303 ['component=="shared_library"', {
304 # cctest can't be built against a shared library, so we need to
305 # depend on the underlying static target in that case.
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000306 'dependencies': ['../../tools/gyp/v8.gyp:v8_maybe_snapshot'],
Ben Murdoch589d6972011-11-30 16:04:58 +0000307 }, {
308 'dependencies': ['../../tools/gyp/v8.gyp:v8'],
309 }],
Ben Murdochb0fe1622011-05-05 13:52:32 +0100310 ],
311 },
Ben Murdoch3fb3ca82011-12-02 17:19:32 +0000312 {
313 'target_name': 'resources',
314 'type': 'none',
315 'variables': {
316 'file_list': [
317 '../../tools/splaytree.js',
318 '../../tools/codemap.js',
319 '../../tools/csvparser.js',
320 '../../tools/consarray.js',
321 '../../tools/profile.js',
322 '../../tools/profile_view.js',
323 '../../tools/logreader.js',
324 'log-eq-of-logging-and-traversal.js',
325 ],
326 },
327 'actions': [
328 {
329 'action_name': 'js2c',
330 'inputs': [
331 '../../tools/js2c.py',
332 '<@(file_list)',
333 ],
334 'outputs': [
335 '<(generated_file)',
336 ],
337 'action': [
338 'python',
339 '../../tools/js2c.py',
340 '<@(_outputs)',
341 'TEST', # type
Ben Murdoch3fb3ca82011-12-02 17:19:32 +0000342 '<@(file_list)',
343 ],
344 }
345 ],
346 },
Ben Murdochb0fe1622011-05-05 13:52:32 +0100347 ],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000348 'conditions': [
349 ['test_isolation_mode != "noop"', {
350 'targets': [
351 {
352 'target_name': 'cctest_run',
353 'type': 'none',
354 'dependencies': [
355 'cctest',
356 ],
357 'includes': [
358 '../../build/isolate.gypi',
359 ],
360 'sources': [
361 'cctest.isolate',
362 ],
363 },
364 ],
365 }],
366 ],
Ben Murdochb0fe1622011-05-05 13:52:32 +0100367}