From feac215e4e811b30d4ca757c56331990db0d7d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 20 Oct 2021 14:41:07 +0200 Subject: [PATCH] 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 Backport-PR-URL: https://github.com/nodejs/node/pull/43247 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', ],