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 ], 41 'include_dirs': [ 42 '../../src', 43 ], 44 'sources': [ 45 '<(generated_file)', 46 'cctest.cc', 47 'gay-fixed.cc', 48 'gay-precision.cc', 49 'gay-shortest.cc', 50 'test-accessors.cc', 51 'test-alloc.cc', 52 'test-api.cc', 53 'test-ast.cc', 54 'test-bignum.cc', 55 'test-bignum-dtoa.cc', 56 'test-circular-queue.cc', 57 'test-compiler.cc', 58 'test-condition-variable.cc', 59 'test-constantpool.cc', 60 'test-conversions.cc', 61 'test-cpu.cc', 62 'test-cpu-profiler.cc', 63 'test-dataflow.cc', 64 'test-date.cc', 65 'test-debug.cc', 66 'test-declarative-accessors.cc', 67 'test-decls.cc', 68 'test-deoptimization.cc', 69 'test-dictionary.cc', 70 'test-diy-fp.cc', 71 'test-double.cc', 72 'test-dtoa.cc', 73 'test-fast-dtoa.cc', 74 'test-fixed-dtoa.cc', 75 'test-flags.cc', 76 'test-func-name-inference.cc', 77 'test-global-handles.cc', 78 'test-global-object.cc', 79 'test-hashing.cc', 80 'test-hashmap.cc', 81 'test-heap.cc', 82 'test-heap-profiler.cc', 83 'test-list.cc', 84 'test-liveedit.cc', 85 'test-lockers.cc', 86 'test-log.cc', 87 'test-mark-compact.cc', 88 'test-mutex.cc', 89 'test-object-observe.cc', 90 'test-parsing.cc', 91 'test-platform.cc', 92 'test-platform-tls.cc', 93 'test-profile-generator.cc', 94 'test-random-number-generator.cc', 95 'test-regexp.cc', 96 'test-reloc-info.cc', 97 'test-representation.cc', 98 'test-semaphore.cc', 99 'test-serialize.cc', 100 'test-socket.cc', 101 'test-spaces.cc', 102 'test-strings.cc', 103 'test-symbols.cc', 104 'test-strtod.cc', 105 'test-thread-termination.cc', 106 'test-threads.cc', 107 'test-time.cc', 108 'test-types.cc', 109 'test-unbound-queue.cc', 110 'test-unique.cc', 111 'test-utils.cc', 112 'test-version.cc', 113 'test-weakmaps.cc', 114 'test-weaksets.cc', 115 'test-weaktypedarrays.cc' 116 ], 117 'conditions': [ 118 ['v8_target_arch=="ia32"', { 119 'sources': [ 120 'test-assembler-ia32.cc', 121 'test-code-stubs.cc', 122 'test-code-stubs-ia32.cc', 123 'test-cpu-ia32.cc', 124 'test-disasm-ia32.cc', 125 'test-macro-assembler-ia32.cc', 126 'test-log-stack-tracer.cc' 127 ], 128 }], 129 ['v8_target_arch=="x64"', { 130 'sources': [ 131 'test-assembler-x64.cc', 132 'test-code-stubs.cc', 133 'test-code-stubs-x64.cc', 134 'test-cpu-x64.cc', 135 'test-macro-assembler-x64.cc', 136 'test-log-stack-tracer.cc' 137 ], 138 }], 139 ['v8_target_arch=="arm"', { 140 'sources': [ 141 'test-assembler-arm.cc', 142 'test-code-stubs.cc', 143 'test-code-stubs-arm.cc', 144 'test-disasm-arm.cc', 145 'test-macro-assembler-arm.cc' 146 ], 147 }], 148 ['v8_target_arch=="mipsel"', { 149 'sources': [ 150 'test-assembler-mips.cc', 151 'test-disasm-mips.cc', 152 'test-macro-assembler-mips.cc' 153 ], 154 }], 155 [ 'OS=="linux"', { 156 'sources': [ 157 'test-platform-linux.cc', 158 ], 159 }], 160 [ 'OS=="mac"', { 161 'sources': [ 162 'test-platform-macos.cc', 163 ], 164 }], 165 [ 'OS=="win"', { 166 'sources': [ 167 'test-platform-win32.cc', 168 ], 169 'msvs_settings': { 170 'VCCLCompilerTool': { 171 # MSVS wants this for gay-{precision,shortest}.cc. 172 'AdditionalOptions': ['/bigobj'], 173 }, 174 }, 175 }], 176 ['component=="shared_library"', { 177 # cctest can't be built against a shared library, so we need to 178 # depend on the underlying static target in that case. 179 'conditions': [ 180 ['v8_use_snapshot=="true"', { 181 'dependencies': ['../../tools/gyp/v8.gyp:v8_snapshot'], 182 }, 183 { 184 'dependencies': [ 185 '../../tools/gyp/v8.gyp:v8_nosnapshot.<(v8_target_arch)', 186 ], 187 }], 188 ], 189 }, { 190 'dependencies': ['../../tools/gyp/v8.gyp:v8'], 191 }], 192 ], 193 }, 194 { 195 'target_name': 'resources', 196 'type': 'none', 197 'variables': { 198 'file_list': [ 199 '../../tools/splaytree.js', 200 '../../tools/codemap.js', 201 '../../tools/csvparser.js', 202 '../../tools/consarray.js', 203 '../../tools/profile.js', 204 '../../tools/profile_view.js', 205 '../../tools/logreader.js', 206 'log-eq-of-logging-and-traversal.js', 207 ], 208 }, 209 'actions': [ 210 { 211 'action_name': 'js2c', 212 'inputs': [ 213 '../../tools/js2c.py', 214 '<@(file_list)', 215 ], 216 'outputs': [ 217 '<(generated_file)', 218 ], 219 'action': [ 220 'python', 221 '../../tools/js2c.py', 222 '<@(_outputs)', 223 'TEST', # type 224 'off', # compression 225 '<@(file_list)', 226 ], 227 } 228 ], 229 }, 230 ], 231} 232