From be32becb671e1bef51e5d162cbe55293be9748e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 17 Jul 2019 17:55:12 +0200 Subject: [PATCH] build: fix building with d8 PR-URL: https://github.com/nodejs/node/pull/28733 Reviewed-By: Gus Caplan Reviewed-By: Joyee Cheung Reviewed-By: Anna Henningsen Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- node.gypi | 2 +- tools/v8_gypfiles/d8.gyp | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/node.gypi b/node.gypi index 938455bbae1bde..5fd1d8e1d48d36 100644 --- a/node.gypi +++ b/node.gypi @@ -66,7 +66,7 @@ 'defines': [ '__POSIX__' ], }], [ 'node_enable_d8=="true"', { - 'dependencies': [ 'deps/v8/gypfiles/d8.gyp:d8' ], + 'dependencies': [ 'tools/v8_gypfiles/d8.gyp:d8' ], }], [ 'node_use_bundled_v8=="true"', { 'dependencies': [ diff --git a/tools/v8_gypfiles/d8.gyp b/tools/v8_gypfiles/d8.gyp index 240df03380cdcf..e995c3cf560d2f 100644 --- a/tools/v8_gypfiles/d8.gyp +++ b/tools/v8_gypfiles/d8.gyp @@ -4,6 +4,7 @@ { 'variables': { + 'V8_ROOT': '../../deps/v8', 'v8_code': 1, 'v8_enable_i18n_support%': 1, }, @@ -16,23 +17,24 @@ 'v8.gyp:v8', 'v8.gyp:v8_libbase', 'v8.gyp:v8_libplatform', + 'v8.gyp:generate_bytecode_builtins_list', ], # Generated source files need this explicitly: 'include_dirs+': [ - '..', + '<(V8_ROOT)', '<(DEPTH)', '<(SHARED_INTERMEDIATE_DIR)', ], 'sources': [ - '../src/async-hooks-wrapper.cc', - '../src/async-hooks-wrapper.h', - '../src/d8-console.cc', - '../src/d8-console.h', - '../src/d8-js.cc', - '../src/d8-platforms.cc', - '../src/d8-platforms.h', - '../src/d8.cc', - '../src/d8.h', + '<(V8_ROOT)/src/async-hooks-wrapper.cc', + '<(V8_ROOT)/src/async-hooks-wrapper.h', + '<(V8_ROOT)/src/d8-console.cc', + '<(V8_ROOT)/src/d8-console.h', + '<(V8_ROOT)/src/d8-js.cc', + '<(V8_ROOT)/src/d8-platforms.cc', + '<(V8_ROOT)/src/d8-platforms.h', + '<(V8_ROOT)/src/d8.cc', + '<(V8_ROOT)/src/d8.h', ], 'conditions': [ [ 'want_separate_host_toolset==1', { @@ -44,10 +46,10 @@ ['(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")', { - 'sources': [ '../src/d8-posix.cc', ] + 'sources': [ '<(V8_ROOT)/src/d8-posix.cc', ] }], [ 'OS=="win"', { - 'sources': [ '../src/d8-windows.cc', ] + 'sources': [ '<(V8_ROOT)/src/d8-windows.cc', ] }], [ 'component!="shared_library"', { 'conditions': [