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