Home | History | Annotate | Download | only in src
      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     'console%': '',
     32     # Enable support for Intel VTune. Supported on ia32/x64 only
     33     'v8_enable_vtunejit%': 0,
     34     'v8_enable_i18n_support%': 1,
     35     'v8_toolset_for_d8%': 'target',
     36   },
     37   'includes': ['../build/toolchain.gypi', '../build/features.gypi'],
     38   'targets': [
     39     {
     40       'target_name': 'd8',
     41       'type': 'executable',
     42       'dependencies': [
     43         '../tools/gyp/v8.gyp:v8',
     44       ],
     45       # Generated source files need this explicitly:
     46       'include_dirs+': [
     47         '..',
     48       ],
     49       'sources': [
     50         'd8.cc',
     51       ],
     52       'conditions': [
     53         [ 'want_separate_host_toolset==1', {
     54           'toolsets': [ '<(v8_toolset_for_d8)', ],
     55         }],
     56         [ 'console=="readline"', {
     57           'libraries': [ '-lreadline', ],
     58           'sources': [ 'd8-readline.cc' ],
     59         }],
     60         [ 'component!="shared_library"', {
     61           'sources': [ 'd8-debug.cc', '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', ],
     62           'conditions': [
     63             [ 'want_separate_host_toolset==1', {
     64               'dependencies': [
     65                 'd8_js2c#host',
     66               ],
     67             }, {
     68               'dependencies': [
     69                 'd8_js2c',
     70               ],
     71             }],
     72             ['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \
     73                or OS=="openbsd" or OS=="solaris" or OS=="android" \
     74                or OS=="qnx")', {
     75               'sources': [ 'd8-posix.cc', ]
     76             }],
     77             [ 'OS=="win"', {
     78               'sources': [ 'd8-windows.cc', ]
     79             }],
     80           ],
     81         }],
     82         ['v8_enable_vtunejit==1', {
     83           'dependencies': [
     84             '../src/third_party/vtune/v8vtune.gyp:v8_vtune',
     85           ],
     86         }],
     87         ['v8_enable_i18n_support==1', {
     88           'dependencies': [
     89             '<(icu_gyp_path):icui18n',
     90             '<(icu_gyp_path):icuuc',
     91           ],
     92         }],
     93         ['OS=="win" and v8_enable_i18n_support==1', {
     94           'dependencies': [
     95             '<(icu_gyp_path):icudata',
     96           ],
     97         }],
     98       ],
     99     },
    100     {
    101       'target_name': 'd8_js2c',
    102       'type': 'none',
    103       'variables': {
    104         'js_files': [
    105           'd8.js',
    106           'macros.py',
    107         ],
    108       },
    109       'conditions': [
    110         [ 'want_separate_host_toolset==1', {
    111           'toolsets': ['host'],
    112         }, {
    113           'toolsets': ['target'],
    114         }]
    115       ],
    116       'actions': [
    117         {
    118           'action_name': 'd8_js2c',
    119           'inputs': [
    120             '../tools/js2c.py',
    121             '<@(js_files)',
    122           ],
    123           'outputs': [
    124             '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc',
    125           ],
    126           'action': [
    127             'python',
    128             '../tools/js2c.py',
    129             '<@(_outputs)',
    130             'D8',
    131             'off',  # compress startup data
    132             '<@(js_files)'
    133           ],
    134         },
    135       ],
    136     }
    137   ],
    138 }
    139