From b1ef6b83d10b098860696efbc998d2d25f03b8b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 5 May 2024 16:44:02 +0200 Subject: [PATCH] build: compile with C++20 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://github.com/nodejs/node/issues/45402 PR-URL: https://github.com/nodejs/node/pull/45427 Fixes: https://github.com/nodejs/node/issues/45402 Reviewed-By: Michael Dawson Reviewed-By: Steven R Loomis Reviewed-By: Tobias Nießen Reviewed-By: Stephen Belanger Reviewed-By: Yagiz Nizipli Reviewed-By: Moshe Atlow Reviewed-By: Ulises Gascón --- common.gypi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index 694f15ebd23c61..b5a1bcad695ff7 100644 --- a/common.gypi +++ b/common.gypi @@ -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': [ @@ -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++', }, }],