cctest.gyp 7.81 KB
Newer Older
1
# Copyright 2012 the V8 project authors. All rights reserved.
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
#     * Redistributions of source code must retain the above copyright
#       notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
#       copyright notice, this list of conditions and the following
#       disclaimer in the documentation and/or other materials provided
#       with the distribution.
#     * Neither the name of Google Inc. nor the names of its
#       contributors may be used to endorse or promote products derived
#       from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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