From a5decd4c8de652e2391b99bfae9ba1dceb3ff816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 30 Jul 2024 14:29:17 +0200 Subject: [PATCH] build: drop experimental support for Windows <10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit V8 now uses Windows APIs that are not available in older Windows versions. PR-URL: https://github.com/nodejs/node/pull/54079 Reviewed-By: Luigi Pinca Reviewed-By: Rafael Gonzaga Reviewed-By: Jiawen Geng Reviewed-By: Stefan Stojanovic Reviewed-By: James M Snell Reviewed-By: Tobias Nießen --- BUILDING.md | 1 - src/node_main.cc | 16 ++++++++-------- tools/v8_gypfiles/toolchain.gypi | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index c0fd9468b533ec..ad226fbe4b197e 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 f66099a55703df..3295121b87a19a 100644 --- a/src/node_main.cc +++ b/src/node_main.cc @@ -35,17 +35,17 @@ 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" - "Setting the " SKIP_CHECK_VAR " environment variable " - "to 1 skips this\ncheck, but Node.js might not execute " - "correctly. Any issues encountered on\nunsupported " - "platforms will not be fixed."); + 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 " + "platforms will not be fixed."); exit(ERROR_EXE_MACHINE_TYPE_MISMATCH); } diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi index 5b7f5544281159..067673b9829f76 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