blob: e60b01f8c847145c9c8c4d4875eb654151dace60 [file] [log] [blame]
Ben Murdoch3ef787d2012-04-12 10:51:47 +01001# Copyright 2012 the V8 project authors. All rights reserved.
Ben Murdochb0fe1622011-05-05 13:52:32 +01002# 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{
Ben Murdoch3fb3ca82011-12-02 17:19:32 +000029 'variables': {
Ben Murdochb8a8cc12014-11-26 15:28:44 +000030 'v8_code': 1,
Ben Murdochb8a8cc12014-11-26 15:28:44 +000031 # Enable support for Intel VTune. Supported on ia32/x64 only
32 'v8_enable_vtunejit%': 0,
33 'v8_enable_i18n_support%': 1,
Ben Murdoch3fb3ca82011-12-02 17:19:32 +000034 },
Ben Murdochc5610432016-08-08 18:44:38 +010035 'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'],
Ben Murdochb0fe1622011-05-05 13:52:32 +010036 'targets': [
37 {
38 'target_name': 'd8',
39 'type': 'executable',
40 'dependencies': [
Ben Murdochc5610432016-08-08 18:44:38 +010041 'v8.gyp:v8',
42 'v8.gyp:v8_libplatform',
Ben Murdochb0fe1622011-05-05 13:52:32 +010043 ],
Ben Murdoch69a99ed2011-11-30 16:03:39 +000044 # Generated source files need this explicitly:
Ben Murdochb0fe1622011-05-05 13:52:32 +010045 'include_dirs+': [
Ben Murdochb8a8cc12014-11-26 15:28:44 +000046 '..',
Ben Murdochb0fe1622011-05-05 13:52:32 +010047 ],
Ben Murdochb0fe1622011-05-05 13:52:32 +010048 'sources': [
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000049 'd8.h',
Ben Murdochb0fe1622011-05-05 13:52:32 +010050 'd8.cc',
Ben Murdochb0fe1622011-05-05 13:52:32 +010051 ],
52 'conditions': [
Ben Murdochb8a8cc12014-11-26 15:28:44 +000053 [ 'want_separate_host_toolset==1', {
Ben Murdochc5610432016-08-08 18:44:38 +010054 'toolsets': [ 'target', ],
Ben Murdochb8a8cc12014-11-26 15:28:44 +000055 }],
Ben Murdochb8a8cc12014-11-26 15:28:44 +000056 ['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \
57 or OS=="openbsd" or OS=="solaris" or OS=="android" \
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000058 or OS=="qnx" or OS=="aix")', {
Ben Murdochb8a8cc12014-11-26 15:28:44 +000059 'sources': [ 'd8-posix.cc', ]
60 }],
61 [ 'OS=="win"', {
62 'sources': [ 'd8-windows.cc', ]
63 }],
Ben Murdoch3fb3ca82011-12-02 17:19:32 +000064 [ 'component!="shared_library"', {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000065 'sources': [
66 '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc',
67 ],
Ben Murdoch3fb3ca82011-12-02 17:19:32 +000068 'conditions': [
Ben Murdoch69a99ed2011-11-30 16:03:39 +000069 [ 'want_separate_host_toolset==1', {
70 'dependencies': [
71 'd8_js2c#host',
72 ],
73 }, {
74 'dependencies': [
75 'd8_js2c',
76 ],
77 }],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000078 [ 'v8_postmortem_support=="true"', {
79 'xcode_settings': {
80 'OTHER_LDFLAGS': [
81 '-Wl,-force_load,<(PRODUCT_DIR)/libv8_base.a'
82 ],
83 },
84 }],
Ben Murdochb8a8cc12014-11-26 15:28:44 +000085 ],
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',
Ben Murdoch3fb3ca82011-12-02 17:19:32 +0000101 ],
Ben Murdoch257744e2011-11-30 15:57:28 +0000102 }],
Ben Murdochb0fe1622011-05-05 13:52:32 +0100103 ],
104 },
105 {
106 'target_name': 'd8_js2c',
107 'type': 'none',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100108 'variables': {
109 'js_files': [
110 'd8.js',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000111 'js/macros.py',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100112 ],
113 },
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000114 'conditions': [
115 [ 'want_separate_host_toolset==1', {
116 'toolsets': ['host'],
117 }, {
118 'toolsets': ['target'],
119 }]
120 ],
Ben Murdochb0fe1622011-05-05 13:52:32 +0100121 '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',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100130 ],
131 'action': [
132 'python',
133 '../tools/js2c.py',
134 '<@(_outputs)',
135 'D8',
Ben Murdochb0fe1622011-05-05 13:52:32 +0100136 '<@(js_files)'
137 ],
138 },
139 ],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000140 },
141 ],
142 'conditions': [
Ben Murdochc5610432016-08-08 18:44:38 +0100143 ['test_isolation_mode != "noop"', {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000144 'targets': [
145 {
146 'target_name': 'd8_run',
147 'type': 'none',
148 'dependencies': [
149 'd8',
150 ],
151 'includes': [
Ben Murdochc5610432016-08-08 18:44:38 +0100152 '../gypfiles/isolate.gypi',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000153 ],
154 'sources': [
155 'd8.isolate',
156 ],
157 },
158 ],
159 }],
Ben Murdochb0fe1622011-05-05 13:52:32 +0100160 ],
161}