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