From f101e43c8a7a975c011298070d7d81cfe1b5d512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 20 Oct 2021 13:28:11 +0200 Subject: [PATCH 1/2] tools: update V8 gypfiles for 9.6 PR-URL: https://github.com/nodejs/node/pull/40488 Reviewed-By: Jiawen Geng Reviewed-By: James M Snell --- tools/v8_gypfiles/v8.gyp | 198 +++++++++++++-------------------------- 1 file changed, 66 insertions(+), 132 deletions(-) diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index a80778d3fa4662..89acbeb345569e 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -50,12 +50,12 @@ { 'target_name': 'run_torque', 'type': 'none', + 'toolsets': ['host', 'target'], 'conditions': [ ['want_separate_host_toolset', { 'dependencies': ['torque#host'], - 'toolsets': ['host', 'target'], }, { - 'dependencies': ['torque'], + 'dependencies': ['torque#target'], }], ], 'hard_dependency': 1, @@ -110,11 +110,9 @@ { 'target_name': 'v8_maybe_icu', 'type': 'none', + 'toolsets': ['host', 'target'], 'hard_dependency': 1, 'conditions': [ - ['want_separate_host_toolset', { - 'toolsets': ['host', 'target'], - }], ['v8_enable_i18n_support==1', { 'dependencies': [ '<(icu_gyp_path):icui18n', @@ -130,11 +128,7 @@ { 'target_name': 'torque_runtime_support', 'type': 'none', - 'conditions': [ - ['want_separate_host_toolset', { - 'toolsets': ['host', 'target'], - }], - ], + 'toolsets': ['host', 'target'], 'direct_dependent_settings': { 'sources': [ '<(V8_ROOT)/src/torque/runtime-support.h', @@ -144,12 +138,8 @@ { 'target_name': 'torque_generated_initializers', 'type': 'none', + 'toolsets': ['host', 'target'], 'hard_dependency': 1, - 'conditions': [ - ['want_separate_host_toolset', { - 'toolsets': ['host', 'target'], - }], - ], 'dependencies': [ 'generate_bytecode_builtins_list', 'run_torque', @@ -171,12 +161,8 @@ { 'target_name': 'torque_generated_definitions', 'type': 'none', + 'toolsets': ['host', 'target'], 'hard_dependency': 1, - 'conditions': [ - ['want_separate_host_toolset', { - 'toolsets': ['host', 'target'], - }], - ], 'dependencies': [ 'generate_bytecode_builtins_list', 'run_torque', @@ -204,12 +190,12 @@ 'target_name': 'generate_bytecode_builtins_list', 'type': 'none', 'hard_dependency': 1, + 'toolsets': ['host', 'target'], 'conditions': [ ['want_separate_host_toolset', { 'dependencies': ['bytecode_builtins_list_generator#host'], - 'toolsets': ['host', 'target'], }, { - 'dependencies': ['bytecode_builtins_list_generator'], + 'dependencies': ['bytecode_builtins_list_generator#target'], }], ], 'direct_dependent_settings': { @@ -242,11 +228,7 @@ { 'target_name': 'v8_init', 'type': 'static_library', - 'conditions': [ - ['want_separate_host_toolset', { - 'toolsets': ['host', 'target'], - }], - ], + 'toolsets': ['host', 'target'], 'dependencies': [ 'generate_bytecode_builtins_list', 'run_torque', @@ -261,6 +243,7 @@ { 'target_name': 'v8_initializers', 'type': 'static_library', + 'toolsets': ['host', 'target'], 'dependencies': [ 'torque_generated_initializers', 'v8_base_without_compiler', @@ -274,9 +257,6 @@ ' Date: Wed, 20 Oct 2021 14:41:07 +0200 Subject: [PATCH 2/2] tools: disable trap handler for Windows cross-compiler `handler-outside-simulator.cc` uses inline assembly, which is not supported by MSVC. PR-URL: https://github.com/nodejs/node/pull/40488 Reviewed-By: Jiawen Geng Reviewed-By: James M Snell --- tools/v8_gypfiles/v8.gyp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 89acbeb345569e..39b96803c71935 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -607,7 +607,8 @@ '<(V8_ROOT)/src/trap-handler/handler-inside-posix.h', ], }], - ['_toolset=="host" and host_arch=="x64" and (OS=="linux" or OS=="mac" or OS=="win")', { + # TODO(targos): Replace False with OS=="win" if handler-outside-simulator.cc becomes compatible with MSVC. + ['_toolset=="host" and host_arch=="x64" and (OS=="linux" or OS=="mac" or False)', { 'sources': [ '<(V8_ROOT)/src/trap-handler/trap-handler-simulator.h', ], @@ -827,13 +828,15 @@ '<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc', ], }], - ['_toolset=="host" and host_arch=="x64" and OS=="win"', { + # TODO(targos): Replace False with OS=="win" if handler-outside-simulator.cc becomes compatible with MSVC. + ['_toolset=="host" and host_arch=="x64" and False', { 'sources': [ '<(V8_ROOT)/src/trap-handler/handler-inside-win.cc', '<(V8_ROOT)/src/trap-handler/handler-outside-win.cc', ], }], - ['_toolset=="host" and host_arch=="x64" and (OS=="linux" or OS=="mac" or OS=="win")', { + # TODO(targos): Replace False with OS=="win" if handler-outside-simulator.cc becomes compatible with MSVC. + ['_toolset=="host" and host_arch=="x64" and (OS=="linux" or OS=="mac" or False)', { 'sources': [ '<(V8_ROOT)/src/trap-handler/handler-outside-simulator.cc', ],