From b338202fab6a7d15f18918921639d16452ee964f Mon Sep 17 00:00:00 2001 From: StefanStojanovic Date: Sun, 21 Apr 2024 11:11:48 +0200 Subject: [PATCH] build: compile with C++20 support on Windows Our Linux build infra is not ready for it yet, but V8 is making it difficult to compile on Windows without it. Refs: https://github.com/nodejs/node/issues/45402 PR-URL: https://github.com/nodejs/node/pull/52465 Reviewed-By: Matteo Collina Reviewed-By: Rafael Gonzaga Reviewed-By: Michael Dawson --- common.gypi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index 18f60c1435..fd94ac4ae6 100644 --- a/common.gypi +++ b/common.gypi @@ -286,7 +286,8 @@ 'VCCLCompilerTool': { 'AdditionalOptions': [ '/Zc:__cplusplus', - '-std:c++17' + # The following option enables c++20 on Windows. This is needed for V8 v12.4+ + '-std:c++20', ], 'BufferSecurityCheck': 'true', 'DebugInformationFormat': 1, # /Z7 embed info in .obj files