blob: 5d0cab3e9869364455d6484e201a0f3533097a65 [file] [log] [blame]
Ben Murdoch3fb3ca82011-12-02 17:19:32 +00001# Copyright 2011 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 Murdoch69a99ed2011-11-30 16:03:39 +000029 'includes': ['../../build/common.gypi'],
Ben Murdoch3fb3ca82011-12-02 17:19:32 +000030 'variables': {
31 'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010032 },
33 'targets': [
34 {
35 'target_name': 'cctest',
36 'type': 'executable',
37 'dependencies': [
Ben Murdoch3fb3ca82011-12-02 17:19:32 +000038 'resources',
Ben Murdochb0fe1622011-05-05 13:52:32 +010039 ],
40 'include_dirs': [
41 '../../src',
42 ],
43 'sources': [
Ben Murdoch3fb3ca82011-12-02 17:19:32 +000044 '<(generated_file)',
Ben Murdochb0fe1622011-05-05 13:52:32 +010045 'cctest.cc',
46 'gay-fixed.cc',
47 'gay-precision.cc',
48 'gay-shortest.cc',
49 'test-accessors.cc',
50 'test-alloc.cc',
51 'test-api.cc',
52 'test-ast.cc',
53 'test-bignum.cc',
54 'test-bignum-dtoa.cc',
55 'test-circular-queue.cc',
56 'test-compiler.cc',
57 'test-conversions.cc',
58 'test-cpu-profiler.cc',
59 'test-dataflow.cc',
60 'test-debug.cc',
61 'test-decls.cc',
62 'test-deoptimization.cc',
Ben Murdoch69a99ed2011-11-30 16:03:39 +000063 'test-dictionary.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010064 'test-diy-fp.cc',
65 'test-double.cc',
66 'test-dtoa.cc',
67 'test-fast-dtoa.cc',
68 'test-fixed-dtoa.cc',
69 'test-flags.cc',
70 'test-func-name-inference.cc',
71 'test-hashmap.cc',
72 'test-heap.cc',
73 'test-heap-profiler.cc',
74 'test-list.cc',
75 'test-liveedit.cc',
76 'test-lock.cc',
Ben Murdoch257744e2011-11-30 15:57:28 +000077 'test-lockers.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010078 'test-log.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010079 'test-mark-compact.cc',
80 'test-parsing.cc',
Ben Murdoch69a99ed2011-11-30 16:03:39 +000081 'test-platform-tls.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010082 'test-profile-generator.cc',
83 'test-regexp.cc',
84 'test-reloc-info.cc',
85 'test-serialize.cc',
86 'test-sockets.cc',
87 'test-spaces.cc',
88 'test-strings.cc',
89 'test-strtod.cc',
90 'test-thread-termination.cc',
91 'test-threads.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010092 'test-unbound-queue.cc',
93 'test-utils.cc',
94 'test-version.cc'
95 ],
96 'conditions': [
97 ['v8_target_arch=="ia32"', {
98 'sources': [
99 'test-assembler-ia32.cc',
100 'test-disasm-ia32.cc',
101 'test-log-stack-tracer.cc'
102 ],
103 }],
104 ['v8_target_arch=="x64"', {
105 'sources': [
106 'test-assembler-x64.cc',
107 'test-macro-assembler-x64.cc',
108 'test-log-stack-tracer.cc'
109 ],
110 }],
111 ['v8_target_arch=="arm"', {
112 'sources': [
113 'test-assembler-arm.cc',
114 'test-disasm-arm.cc'
115 ],
116 }],
117 ['v8_target_arch=="mips"', {
118 'sources': [
119 'test-assembler-mips.cc',
Ben Murdoch257744e2011-11-30 15:57:28 +0000120 'test-disasm-mips.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100121 ],
122 }],
123 [ 'OS=="linux"', {
124 'sources': [
125 'test-platform-linux.cc',
126 ],
127 }],
128 [ 'OS=="mac"', {
129 'sources': [
130 'test-platform-macos.cc',
131 ],
132 }],
133 [ 'OS=="win"', {
134 'sources': [
135 'test-platform-win32.cc',
136 ],
137 }],
Ben Murdoch589d6972011-11-30 16:04:58 +0000138 ['component=="shared_library"', {
139 # cctest can't be built against a shared library, so we need to
140 # depend on the underlying static target in that case.
141 'conditions': [
142 ['v8_use_snapshot=="true"', {
143 'dependencies': ['../../tools/gyp/v8.gyp:v8_snapshot'],
144 },
145 {
146 'dependencies': ['../../tools/gyp/v8.gyp:v8_nosnapshot'],
147 }],
148 ],
149 }, {
150 'dependencies': ['../../tools/gyp/v8.gyp:v8'],
151 }],
Ben Murdochb0fe1622011-05-05 13:52:32 +0100152 ],
153 },
Ben Murdoch3fb3ca82011-12-02 17:19:32 +0000154 {
155 'target_name': 'resources',
156 'type': 'none',
157 'variables': {
158 'file_list': [
159 '../../tools/splaytree.js',
160 '../../tools/codemap.js',
161 '../../tools/csvparser.js',
162 '../../tools/consarray.js',
163 '../../tools/profile.js',
164 '../../tools/profile_view.js',
165 '../../tools/logreader.js',
166 'log-eq-of-logging-and-traversal.js',
167 ],
168 },
169 'actions': [
170 {
171 'action_name': 'js2c',
172 'inputs': [
173 '../../tools/js2c.py',
174 '<@(file_list)',
175 ],
176 'outputs': [
177 '<(generated_file)',
178 ],
179 'action': [
180 'python',
181 '../../tools/js2c.py',
182 '<@(_outputs)',
183 'TEST', # type
184 'off', # compression
185 '<@(file_list)',
186 ],
187 }
188 ],
189 },
Ben Murdochb0fe1622011-05-05 13:52:32 +0100190 ],
191}