From 11b6b21119b4ea56071c27d5f4113fd3029d67b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 28 Jul 2024 10:59:50 +0200 Subject: [PATCH] build: drop support for Windows <10 V8 now uses Windows APIs that are not available in older Windows versions. --- BUILDING.md | 1 - src/node_main.cc | 7 +++---- tools/v8_gypfiles/toolchain.gypi | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index c0fd9468b533ecb..ad226fbe4b197e6 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -112,7 +112,6 @@ platforms. This is true regardless of entries in the table below. | GNU/Linux | s390x | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. RHEL 8 | | GNU/Linux | loong64 | kernel >= 5.19, glibc >= 2.36 | Experimental | | | Windows | x64 | >= Windows 10/Server 2016 | Tier 1 | [^2],[^3] | -| Windows | x64 | Windows 8.1/Server 2012 | Experimental | | | Windows | arm64 | >= Windows 10 | Tier 2 | | | macOS | x64 | >= 11.0 | Tier 1 | For notes about compilation see [^4] | | macOS | arm64 | >= 11.0 | Tier 1 | | diff --git a/src/node_main.cc b/src/node_main.cc index f66099a55703dff..ed00ea3109e9641 100644 --- a/src/node_main.cc +++ b/src/node_main.cc @@ -35,13 +35,12 @@ int wmain(int argc, wchar_t* wargv[]) { // Windows Server 2012 (not R2) is supported until 10/10/2023, so we allow it // to run in the experimental support tier. char buf[SKIP_CHECK_STRLEN + 1]; - if (!IsWindows8Point1OrGreater() && - !(IsWindowsServer() && IsWindows8OrGreater()) && + if (!IsWindows10OrGreater() && (GetEnvironmentVariableA(SKIP_CHECK_VAR, buf, sizeof(buf)) != SKIP_CHECK_STRLEN || strncmp(buf, SKIP_CHECK_VALUE, SKIP_CHECK_STRLEN) != 0)) { - fprintf(stderr, "Node.js is only supported on Windows 8.1, Windows " - "Server 2012 R2, or higher.\n" + fprintf(stderr, "Node.js is only supported on Windows 10, Windows " + "Server 2016, or higher.\n" "Setting the " SKIP_CHECK_VAR " environment variable " "to 1 skips this\ncheck, but Node.js might not execute " "correctly. Any issues encountered on\nunsupported " diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi index 5b7f5544281159e..067673b9829f766 100644 --- a/tools/v8_gypfiles/toolchain.gypi +++ b/tools/v8_gypfiles/toolchain.gypi @@ -540,7 +540,7 @@ 'defines': [ 'WIN32', 'NOMINMAX', # Refs: https://chromium-review.googlesource.com/c/v8/v8/+/1456620 - '_WIN32_WINNT=0x0602', # Windows 8 + '_WIN32_WINNT=0x0A00', # Windows 10 '_SILENCE_ALL_CXX20_DEPRECATION_WARNINGS', ], # 4351: VS 2005 and later are warning us that they've fixed a bug