0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
nodejs/tools/v8_gypfiles/d8.gyp
Richard Lau bc13f23f7e
build: fix --enable-d8 builds
Add `v8_abseil` as a dependency for `d8` and use scraping to pick up
the list of source files (including the previously missing
`src/d8/d8-test.cc`).

PR-URL: https://github.com/nodejs/node/pull/53106
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-05-24 17:32:09 +00:00

73 lines
2.1 KiB
Python

# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'V8_ROOT': '../../deps/v8',
'v8_code': 1,
# Enable support for Intel VTune. Supported on ia32/x64 only
'v8_enable_vtunejit%': 0,
'v8_enable_i18n_support%': 1,
},
'includes': ['toolchain.gypi', 'features.gypi'],
'targets': [
{
'target_name': 'd8',
'type': 'executable',
'dependencies': [
'v8.gyp:v8',
'v8.gyp:v8_libbase',
'v8.gyp:v8_libplatform',
'v8.gyp:generate_bytecode_builtins_list',
'v8.gyp:v8_abseil',
],
# Generated source files need this explicitly:
'include_dirs+': [
'<(V8_ROOT)',
'<(DEPTH)',
'<(SHARED_INTERMEDIATE_DIR)',
],
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_executable.\\"d8\\".*?sources = ")',
],
'conditions': [
[ 'want_separate_host_toolset==1', {
'toolsets': [ 'target', ],
'dependencies': [
'd8_js2c#host',
],
}],
['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \
or OS=="openbsd" or OS=="solaris" or OS=="android" \
or OS=="qnx" or OS=="aix" or OS=="os400")', {
'sources': [ '<(V8_ROOT)/src/d8/d8-posix.cc', ]
}],
[ 'OS=="win"', {
'sources': [ '<(V8_ROOT)/src/d8/d8-windows.cc', ]
}],
['v8_enable_vtunejit==1', {
'dependencies': [
'v8vtune.gyp:v8_vtune',
],
}],
['v8_enable_i18n_support==1', {
'dependencies': [
'<(icu_gyp_path):icui18n',
'<(icu_gyp_path):icuuc',
],
}],
['OS=="win" and v8_enable_i18n_support==1', {
'dependencies': [
'<(icu_gyp_path):icudata',
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
},
],
}