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 # Enable support for Intel VTune. Supported on ia32/x64 only 32 'v8_enable_vtunejit%': 0, 33 'v8_enable_i18n_support%': 1, 34 }, 35 'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'], 36 'targets': [ 37 { 38 'target_name': 'd8', 39 'type': 'executable', 40 'dependencies': [ 41 'v8.gyp:v8', 42 'v8.gyp:v8_libbase', 43 'v8.gyp:v8_libplatform', 44 ], 45 # Generated source files need this explicitly: 46 'include_dirs+': [ 47 '..', 48 '<(DEPTH)', 49 ], 50 'sources': [ 51 'd8.h', 52 'd8.cc', 53 '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', 54 ], 55 'conditions': [ 56 [ 'want_separate_host_toolset==1', { 57 'toolsets': [ 'target', ], 58 'dependencies': [ 59 'd8_js2c#host', 60 ], 61 }, { 62 'dependencies': [ 63 'd8_js2c', 64 ], 65 }], 66 ['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \ 67 or OS=="openbsd" or OS=="solaris" or OS=="android" \ 68 or OS=="qnx" or OS=="aix")', { 69 'sources': [ 'd8-posix.cc', ] 70 }], 71 [ 'OS=="win"', { 72 'sources': [ 'd8-windows.cc', ] 73 }], 74 [ 'component!="shared_library"', { 75 'conditions': [ 76 [ 'v8_postmortem_support=="true"', { 77 'xcode_settings': { 78 'OTHER_LDFLAGS': [ 79 '-Wl,-force_load,<(PRODUCT_DIR)/libv8_base.a' 80 ], 81 }, 82 }], 83 ], 84 }], 85 ['v8_enable_vtunejit==1', { 86 'dependencies': [ 87 '../src/third_party/vtune/v8vtune.gyp:v8_vtune', 88 ], 89 }], 90 ['v8_enable_i18n_support==1', { 91 'dependencies': [ 92 '<(icu_gyp_path):icui18n', 93 '<(icu_gyp_path):icuuc', 94 ], 95 }], 96 ['OS=="win" and v8_enable_i18n_support==1', { 97 'dependencies': [ 98 '<(icu_gyp_path):icudata', 99 ], 100 }], 101 ], 102 }, 103 { 104 'target_name': 'd8_js2c', 105 'type': 'none', 106 'variables': { 107 'js_files': [ 108 'd8.js', 109 'js/macros.py', 110 ], 111 }, 112 'conditions': [ 113 [ 'want_separate_host_toolset==1', { 114 'toolsets': ['host'], 115 }, { 116 'toolsets': ['target'], 117 }] 118 ], 119 'actions': [ 120 { 121 'action_name': 'd8_js2c', 122 'inputs': [ 123 '../tools/js2c.py', 124 '<@(js_files)', 125 ], 126 'outputs': [ 127 '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', 128 ], 129 'action': [ 130 'python', 131 '../tools/js2c.py', 132 '<@(_outputs)', 133 'D8', 134 '<@(js_files)' 135 ], 136 }, 137 ], 138 }, 139 ], 140 'conditions': [ 141 ['test_isolation_mode != "noop"', { 142 'targets': [ 143 { 144 'target_name': 'd8_run', 145 'type': 'none', 146 'dependencies': [ 147 'd8', 148 ], 149 'includes': [ 150 '../gypfiles/isolate.gypi', 151 ], 152 'sources': [ 153 'd8.isolate', 154 ], 155 }, 156 ], 157 }], 158 ], 159} 160