11cb0ef41Sopenharmony_ci# Copyright 2018 the V8 project authors. All rights reserved.
21cb0ef41Sopenharmony_ci# Use of this source code is governed by a BSD-style license that can be
31cb0ef41Sopenharmony_ci# found in the LICENSE file.
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ci{
61cb0ef41Sopenharmony_ci  'variables': {
71cb0ef41Sopenharmony_ci    'V8_ROOT': '../../deps/v8',
81cb0ef41Sopenharmony_ci    'v8_code': 1,
91cb0ef41Sopenharmony_ci    # Enable support for Intel VTune. Supported on ia32/x64 only
101cb0ef41Sopenharmony_ci    'v8_enable_vtunejit%': 0,
111cb0ef41Sopenharmony_ci    'v8_enable_i18n_support%': 1,
121cb0ef41Sopenharmony_ci  },
131cb0ef41Sopenharmony_ci  'includes': ['toolchain.gypi', 'features.gypi'],
141cb0ef41Sopenharmony_ci  'targets': [
151cb0ef41Sopenharmony_ci    {
161cb0ef41Sopenharmony_ci      'target_name': 'd8',
171cb0ef41Sopenharmony_ci      'type': 'executable',
181cb0ef41Sopenharmony_ci      'dependencies': [
191cb0ef41Sopenharmony_ci        'v8.gyp:v8',
201cb0ef41Sopenharmony_ci        'v8.gyp:v8_libbase',
211cb0ef41Sopenharmony_ci        'v8.gyp:v8_libplatform',
221cb0ef41Sopenharmony_ci        'v8.gyp:generate_bytecode_builtins_list',
231cb0ef41Sopenharmony_ci      ],
241cb0ef41Sopenharmony_ci      # Generated source files need this explicitly:
251cb0ef41Sopenharmony_ci      'include_dirs+': [
261cb0ef41Sopenharmony_ci        '<(V8_ROOT)',
271cb0ef41Sopenharmony_ci        '<(DEPTH)',
281cb0ef41Sopenharmony_ci        '<(SHARED_INTERMEDIATE_DIR)',
291cb0ef41Sopenharmony_ci      ],
301cb0ef41Sopenharmony_ci      'sources': [
311cb0ef41Sopenharmony_ci        '<(V8_ROOT)/src/d8/async-hooks-wrapper.cc',
321cb0ef41Sopenharmony_ci        '<(V8_ROOT)/src/d8/async-hooks-wrapper.h',
331cb0ef41Sopenharmony_ci        '<(V8_ROOT)/src/d8/d8-console.cc',
341cb0ef41Sopenharmony_ci        '<(V8_ROOT)/src/d8/d8-console.h',
351cb0ef41Sopenharmony_ci        '<(V8_ROOT)/src/d8/d8-js.cc',
361cb0ef41Sopenharmony_ci        '<(V8_ROOT)/src/d8/d8-platforms.cc',
371cb0ef41Sopenharmony_ci        '<(V8_ROOT)/src/d8/d8-platforms.h',
381cb0ef41Sopenharmony_ci        '<(V8_ROOT)/src/d8/d8.cc',
391cb0ef41Sopenharmony_ci        '<(V8_ROOT)/src/d8/d8.h',
401cb0ef41Sopenharmony_ci      ],
411cb0ef41Sopenharmony_ci      'conditions': [
421cb0ef41Sopenharmony_ci        [ 'want_separate_host_toolset==1', {
431cb0ef41Sopenharmony_ci          'toolsets': [ 'target', ],
441cb0ef41Sopenharmony_ci          'dependencies': [
451cb0ef41Sopenharmony_ci            'd8_js2c#host',
461cb0ef41Sopenharmony_ci          ],
471cb0ef41Sopenharmony_ci        }],
481cb0ef41Sopenharmony_ci        ['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \
491cb0ef41Sopenharmony_ci           or OS=="openbsd" or OS=="solaris" or OS=="android" \
501cb0ef41Sopenharmony_ci           or OS=="qnx" or OS=="aix" or OS=="os400")', {
511cb0ef41Sopenharmony_ci             'sources': [ '<(V8_ROOT)/src/d8/d8-posix.cc', ]
521cb0ef41Sopenharmony_ci           }],
531cb0ef41Sopenharmony_ci        [ 'OS=="win"', {
541cb0ef41Sopenharmony_ci          'sources': [ '<(V8_ROOT)/src/d8/d8-windows.cc', ]
551cb0ef41Sopenharmony_ci        }],
561cb0ef41Sopenharmony_ci        ['v8_enable_vtunejit==1', {
571cb0ef41Sopenharmony_ci          'dependencies': [
581cb0ef41Sopenharmony_ci            'v8vtune.gyp:v8_vtune',
591cb0ef41Sopenharmony_ci          ],
601cb0ef41Sopenharmony_ci        }],
611cb0ef41Sopenharmony_ci        ['v8_enable_i18n_support==1', {
621cb0ef41Sopenharmony_ci          'dependencies': [
631cb0ef41Sopenharmony_ci            '<(icu_gyp_path):icui18n',
641cb0ef41Sopenharmony_ci            '<(icu_gyp_path):icuuc',
651cb0ef41Sopenharmony_ci          ],
661cb0ef41Sopenharmony_ci        }],
671cb0ef41Sopenharmony_ci        ['OS=="win" and v8_enable_i18n_support==1', {
681cb0ef41Sopenharmony_ci          'dependencies': [
691cb0ef41Sopenharmony_ci            '<(icu_gyp_path):icudata',
701cb0ef41Sopenharmony_ci          ],
711cb0ef41Sopenharmony_ci        }],
721cb0ef41Sopenharmony_ci        # Avoid excessive LTO
731cb0ef41Sopenharmony_ci        ['enable_lto=="true"', {
741cb0ef41Sopenharmony_ci          'ldflags': [ '-fno-lto' ],
751cb0ef41Sopenharmony_ci        }],
761cb0ef41Sopenharmony_ci      ],
771cb0ef41Sopenharmony_ci    },
781cb0ef41Sopenharmony_ci  ],
791cb0ef41Sopenharmony_ci}
80