Skip to content

Commit

Permalink
build: compile with C++20 support
Browse files Browse the repository at this point in the history
Closes: nodejs#45402
PR-URL: nodejs#45427
Fixes: nodejs#45402
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Steven R Loomis <srl295@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
  • Loading branch information
targos authored and Chenyu Yang committed May 8, 2024
1 parent 850aff0 commit 873c113
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@
}],
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++20' ],
'defines': [ '__STDC_FORMAT_MACROS' ],
'ldflags': [ '-rdynamic' ],
'target_conditions': [
Expand Down Expand Up @@ -638,7 +638,7 @@
['clang==1', {
'xcode_settings': {
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++17', # -std=gnu++17
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++20', # -std=gnu++20
'CLANG_CXX_LIBRARY': 'libc++',
},
}],
Expand Down

0 comments on commit 873c113

Please sign in to comment.