Skip to content

Commit 1f04009

Browse files
committed
build: compile with C++20 support
Closes: nodejs#45402
1 parent bbdcabb commit 1f04009

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

common.gypi

+3-3
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280
'VCCLCompilerTool': {
281281
'AdditionalOptions': [
282282
'/Zc:__cplusplus',
283-
'-std:c++17'
283+
'-std:c++20'
284284
],
285285
'BufferSecurityCheck': 'true',
286286
'DebugInformationFormat': 1, # /Z7 embed info in .obj files
@@ -399,7 +399,7 @@
399399
}],
400400
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
401401
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
402-
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ],
402+
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++2a' ],
403403
'defines': [ '__STDC_FORMAT_MACROS' ],
404404
'ldflags': [ '-rdynamic' ],
405405
'target_conditions': [
@@ -539,7 +539,7 @@
539539
['clang==1', {
540540
'xcode_settings': {
541541
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
542-
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++17', # -std=gnu++17
542+
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++20', # -std=gnu++20
543543
'CLANG_CXX_LIBRARY': 'libc++',
544544
},
545545
}],

0 commit comments

Comments
 (0)