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 <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
StefanStojanovic 2024-04-21 11:11:48 +02:00 committed by Node.js GitHub Bot
parent 84aeeff06a
commit b338202fab

View File

@ -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