1# Copyright 2018 the V8 project authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6  'variables': {
7    'V8_ROOT': '../../deps/v8',
8    'v8_code': 1,
9    # Enable support for Intel VTune. Supported on ia32/x64 only
10    'v8_enable_vtunejit%': 0,
11    'v8_enable_i18n_support%': 1,
12  },
13  'includes': ['toolchain.gypi', 'features.gypi'],
14  'targets': [
15    {
16      'target_name': 'd8',
17      'type': 'executable',
18      'dependencies': [
19        'v8.gyp:v8',
20        'v8.gyp:v8_libbase',
21        'v8.gyp:v8_libplatform',
22        'v8.gyp:generate_bytecode_builtins_list',
23      ],
24      # Generated source files need this explicitly:
25      'include_dirs+': [
26        '<(V8_ROOT)',
27        '<(DEPTH)',
28        '<(SHARED_INTERMEDIATE_DIR)',
29      ],
30      'sources': [
31        '<(V8_ROOT)/src/d8/async-hooks-wrapper.cc',
32        '<(V8_ROOT)/src/d8/async-hooks-wrapper.h',
33        '<(V8_ROOT)/src/d8/d8-console.cc',
34        '<(V8_ROOT)/src/d8/d8-console.h',
35        '<(V8_ROOT)/src/d8/d8-js.cc',
36        '<(V8_ROOT)/src/d8/d8-platforms.cc',
37        '<(V8_ROOT)/src/d8/d8-platforms.h',
38        '<(V8_ROOT)/src/d8/d8.cc',
39        '<(V8_ROOT)/src/d8/d8.h',
40      ],
41      'conditions': [
42        [ 'want_separate_host_toolset==1', {
43          'toolsets': [ 'target', ],
44          'dependencies': [
45            'd8_js2c#host',
46          ],
47        }],
48        ['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \
49           or OS=="openbsd" or OS=="solaris" or OS=="android" \
50           or OS=="qnx" or OS=="aix" or OS=="os400")', {
51             'sources': [ '<(V8_ROOT)/src/d8/d8-posix.cc', ]
52           }],
53        [ 'OS=="win"', {
54          'sources': [ '<(V8_ROOT)/src/d8/d8-windows.cc', ]
55        }],
56        ['v8_enable_vtunejit==1', {
57          'dependencies': [
58            'v8vtune.gyp:v8_vtune',
59          ],
60        }],
61        ['v8_enable_i18n_support==1', {
62          'dependencies': [
63            '<(icu_gyp_path):icui18n',
64            '<(icu_gyp_path):icuuc',
65          ],
66        }],
67        ['OS=="win" and v8_enable_i18n_support==1', {
68          'dependencies': [
69            '<(icu_gyp_path):icudata',
70          ],
71        }],
72        # Avoid excessive LTO
73        ['enable_lto=="true"', {
74          'ldflags': [ '-fno-lto' ],
75        }],
76      ],
77    },
78  ],
79}
80