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