blob: a242fe3c85181c5fca99869839a426740c25e5c8 [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 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',
Ben Murdoch3ef787d2012-04-12 10:51:47 +010060 'test-date.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010061 'test-debug.cc',
62 'test-decls.cc',
63 'test-deoptimization.cc',
Ben Murdoch69a99ed2011-11-30 16:03:39 +000064 'test-dictionary.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010065 'test-diy-fp.cc',
66 'test-double.cc',
67 'test-dtoa.cc',
68 'test-fast-dtoa.cc',
69 'test-fixed-dtoa.cc',
70 'test-flags.cc',
71 'test-func-name-inference.cc',
Ben Murdoch3ef787d2012-04-12 10:51:47 +010072 'test-hashing.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010073 'test-hashmap.cc',
74 'test-heap.cc',
75 'test-heap-profiler.cc',
76 'test-list.cc',
77 'test-liveedit.cc',
78 'test-lock.cc',
Ben Murdoch257744e2011-11-30 15:57:28 +000079 'test-lockers.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010080 'test-log.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010081 'test-mark-compact.cc',
82 'test-parsing.cc',
Ben Murdoch69a99ed2011-11-30 16:03:39 +000083 'test-platform-tls.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010084 'test-profile-generator.cc',
Ben Murdoch3ef787d2012-04-12 10:51:47 +010085 'test-random.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010086 'test-regexp.cc',
87 'test-reloc-info.cc',
88 'test-serialize.cc',
89 'test-sockets.cc',
90 'test-spaces.cc',
91 'test-strings.cc',
92 'test-strtod.cc',
93 'test-thread-termination.cc',
94 'test-threads.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010095 'test-unbound-queue.cc',
96 'test-utils.cc',
Ben Murdoch3ef787d2012-04-12 10:51:47 +010097 'test-version.cc',
98 'test-weakmaps.cc'
Ben Murdochb0fe1622011-05-05 13:52:32 +010099 ],
100 'conditions': [
101 ['v8_target_arch=="ia32"', {
102 'sources': [
103 'test-assembler-ia32.cc',
104 'test-disasm-ia32.cc',
105 'test-log-stack-tracer.cc'
106 ],
107 }],
108 ['v8_target_arch=="x64"', {
109 'sources': [
110 'test-assembler-x64.cc',
111 'test-macro-assembler-x64.cc',
112 'test-log-stack-tracer.cc'
113 ],
114 }],
115 ['v8_target_arch=="arm"', {
116 'sources': [
117 'test-assembler-arm.cc',
118 'test-disasm-arm.cc'
119 ],
120 }],
121 ['v8_target_arch=="mips"', {
122 'sources': [
123 'test-assembler-mips.cc',
Ben Murdoch257744e2011-11-30 15:57:28 +0000124 'test-disasm-mips.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100125 ],
126 }],
127 [ 'OS=="linux"', {
128 'sources': [
129 'test-platform-linux.cc',
130 ],
131 }],
132 [ 'OS=="mac"', {
133 'sources': [
134 'test-platform-macos.cc',
135 ],
136 }],
137 [ 'OS=="win"', {
138 'sources': [
139 'test-platform-win32.cc',
140 ],
Ben Murdoch3ef787d2012-04-12 10:51:47 +0100141 'msvs_settings': {
142 'VCCLCompilerTool': {
143 # MSVS wants this for gay-{precision,shortest}.cc.
144 'AdditionalOptions': ['/bigobj'],
145 },
146 },
Ben Murdochb0fe1622011-05-05 13:52:32 +0100147 }],
Ben Murdoch589d6972011-11-30 16:04:58 +0000148 ['component=="shared_library"', {
149 # cctest can't be built against a shared library, so we need to
150 # depend on the underlying static target in that case.
151 'conditions': [
152 ['v8_use_snapshot=="true"', {
153 'dependencies': ['../../tools/gyp/v8.gyp:v8_snapshot'],
154 },
155 {
156 'dependencies': ['../../tools/gyp/v8.gyp:v8_nosnapshot'],
157 }],
158 ],
159 }, {
160 'dependencies': ['../../tools/gyp/v8.gyp:v8'],
161 }],
Ben Murdochb0fe1622011-05-05 13:52:32 +0100162 ],
163 },
Ben Murdoch3fb3ca82011-12-02 17:19:32 +0000164 {
165 'target_name': 'resources',
166 'type': 'none',
167 'variables': {
168 'file_list': [
169 '../../tools/splaytree.js',
170 '../../tools/codemap.js',
171 '../../tools/csvparser.js',
172 '../../tools/consarray.js',
173 '../../tools/profile.js',
174 '../../tools/profile_view.js',
175 '../../tools/logreader.js',
176 'log-eq-of-logging-and-traversal.js',
177 ],
178 },
179 'actions': [
180 {
181 'action_name': 'js2c',
182 'inputs': [
183 '../../tools/js2c.py',
184 '<@(file_list)',
185 ],
186 'outputs': [
187 '<(generated_file)',
188 ],
189 'action': [
190 'python',
191 '../../tools/js2c.py',
192 '<@(_outputs)',
193 'TEST', # type
194 'off', # compression
195 '<@(file_list)',
196 ],
197 }
198 ],
199 },
Ben Murdochb0fe1622011-05-05 13:52:32 +0100200 ],
201}