From fc032247e0023d21fee6c391f80df7caf45d7e16 Mon Sep 17 00:00:00 2001 From: Richard Townsend Date: Fri, 22 May 2020 11:37:39 +0100 Subject: [PATCH] build: fix GetCurrentThreadStackLimits error on Windows on Arm GetCurrentThreadStackLimits is a fairly new API, so it requires a _WIN32_WINNT value of at least 0x0602 to compile successfully. Change-Id: Ib3bc24513453aa37bee68f4a6999cefc26947cb1 PR-URL: https://github.com/nodejs/node/pull/33511 Reviewed-By: James M Snell Reviewed-By: Richard Lau Reviewed-By: Shelley Vohr Reviewed-By: Ruben Bridgewater --- tools/v8_gypfiles/v8.gyp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 87384d8233db75..42adb81b470437 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -1081,8 +1081,10 @@ '<(V8_ROOT)/src/base/platform/platform-win32.cc', '<(V8_ROOT)/src/base/win32-headers.h', ], - - 'defines': ['_CRT_RAND_S'], # for rand_s() + 'conditions': [['target_arch == "arm64"', { + 'defines': ['_WIN32_WINNT=0x0602'], # For GetCurrentThreadStackLimits on Windows on Arm + }]], + 'defines': ['_CRT_RAND_S'], # for rand_s() 'direct_dependent_settings': { 'msvs_settings': { 'VCLinkerTool': {