blob: ea043dcf4f7e534c23cc7d04791281bfef9a2646 [file] [log] [blame]
ulan@chromium.org2efb9002012-01-19 15:36:35 +00001# Copyright 2012 the V8 project authors. All rights reserved.
ager@chromium.org5f0c45f2010-12-17 08:51:21 +00002# 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{
ricow@chromium.org4668a2c2011-08-29 10:41:00 +000029 'includes': ['../build/common.gypi'],
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000030 'variables': {
31 'console%': '',
mstarzinger@chromium.orge27d6172013-04-17 11:51:44 +000032 # Enable support for Intel VTune. Supported on ia32/x64 only
33 'v8_enable_vtunejit%': 0,
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000034 },
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000035 'targets': [
36 {
37 'target_name': 'd8',
38 'type': 'executable',
39 'dependencies': [
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000040 '../tools/gyp/v8.gyp:v8',
41 ],
ricow@chromium.org4668a2c2011-08-29 10:41:00 +000042 # Generated source files need this explicitly:
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000043 'include_dirs+': [
44 '../src',
45 ],
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000046 'sources': [
47 'd8.cc',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000048 ],
49 'conditions': [
jkummerow@chromium.org59297c72013-01-09 16:32:23 +000050 [ 'console=="readline"', {
51 'libraries': [ '-lreadline', ],
52 'sources': [ 'd8-readline.cc' ],
53 }],
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000054 [ 'component!="shared_library"', {
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000055 'sources': [ 'd8-debug.cc', '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', ],
56 'conditions': [
kmillikin@chromium.org7c2628c2011-08-10 11:27:35 +000057 [ 'want_separate_host_toolset==1', {
58 'dependencies': [
59 'd8_js2c#host',
60 ],
61 }, {
62 'dependencies': [
63 'd8_js2c',
64 ],
65 }],
rossberg@chromium.orgfab14982012-01-05 15:02:15 +000066 ['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \
67 or OS=="openbsd" or OS=="solaris" or OS=="android")', {
svenpanne@chromium.org84bcc552011-07-18 09:50:57 +000068 'sources': [ 'd8-posix.cc', ]
69 }],
70 [ 'OS=="win"', {
71 'sources': [ 'd8-windows.cc', ]
72 }],
73 ],
sgjesse@chromium.org8e8294a2011-05-02 14:30:53 +000074 }],
mstarzinger@chromium.orge27d6172013-04-17 11:51:44 +000075 ['v8_enable_vtunejit==1', {
76 'dependencies': [
77 '../src/third_party/vtune/v8vtune.gyp:v8_vtune',
78 ],
79 }],
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000080 ],
81 },
82 {
83 'target_name': 'd8_js2c',
84 'type': 'none',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000085 'variables': {
86 'js_files': [
87 'd8.js',
danno@chromium.org160a7b02011-04-18 15:51:38 +000088 'macros.py',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000089 ],
90 },
kmillikin@chromium.org7c2628c2011-08-10 11:27:35 +000091 'conditions': [
92 [ 'want_separate_host_toolset==1', {
93 'toolsets': ['host'],
94 }, {
95 'toolsets': ['target'],
96 }]
97 ],
ager@chromium.org5f0c45f2010-12-17 08:51:21 +000098 'actions': [
99 {
100 'action_name': 'd8_js2c',
101 'inputs': [
102 '../tools/js2c.py',
103 '<@(js_files)',
104 ],
105 'outputs': [
106 '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc',
ager@chromium.org5f0c45f2010-12-17 08:51:21 +0000107 ],
108 'action': [
109 'python',
110 '../tools/js2c.py',
111 '<@(_outputs)',
112 'D8',
kmillikin@chromium.org7c2628c2011-08-10 11:27:35 +0000113 'off', # compress startup data
ager@chromium.org5f0c45f2010-12-17 08:51:21 +0000114 '<@(js_files)'
115 ],
116 },
117 ],
118 }
119 ],
120}