From adcebfdcf9e11cad6f70f67ce2339a2b284398ee 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 af2ff9c602e432..67f21729677b6f 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -1073,8 +1073,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': {