Home | History | Annotate | Download | only in cctest
      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   'includes': ['../../build/common.gypi'],
     30   'variables': {
     31     'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
     32   },
     33   'targets': [
     34     {
     35       'target_name': 'cctest',
     36       'type': 'executable',
     37       'dependencies': [
     38         'resources',
     39       ],
     40       'include_dirs': [
     41         '../../src',
     42       ],
     43       'sources': [
     44         '<(generated_file)',
     45         '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-date.cc',
     61         'test-debug.cc',
     62         'test-decls.cc',
     63         'test-deoptimization.cc',
     64         'test-dictionary.cc',
     65         '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',
     72         'test-hashing.cc',
     73         'test-hashmap.cc',
     74         'test-heap.cc',
     75         'test-heap-profiler.cc',
     76         'test-list.cc',
     77         'test-liveedit.cc',
     78         'test-lock.cc',
     79         'test-lockers.cc',
     80         'test-log.cc',
     81         'test-mark-compact.cc',
     82         'test-parsing.cc',
     83         'test-platform-tls.cc',
     84         'test-profile-generator.cc',
     85         'test-random.cc',
     86         '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',
     95         'test-unbound-queue.cc',
     96         'test-utils.cc',
     97         'test-version.cc',
     98         'test-weakmaps.cc'
     99       ],
    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',
    124             'test-disasm-mips.cc',
    125           ],
    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           ],
    141           'msvs_settings': {
    142             'VCCLCompilerTool': {
    143               # MSVS wants this for gay-{precision,shortest}.cc.
    144               'AdditionalOptions': ['/bigobj'],
    145             },
    146           },
    147         }],
    148         ['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         }],
    162       ],
    163     },
    164     {
    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     },
    200   ],
    201 }
    202