From bd90b073e36b19c5b4e54c5dc601fce84a008a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 3 May 2024 13:39:53 +0200 Subject: [PATCH] build: compile with C++20 support when using Clang This is required by V8 12.6+ Refs: https://github.com/v8/v8/commit/4421c3672a09788b36317b88a3f6f1e2ebadaa39 --- common.gypi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index da9076c0044e21..75fd6880b471de 100644 --- a/common.gypi +++ b/common.gypi @@ -528,6 +528,10 @@ }], ], 'conditions': [ + [ 'clang==1', { + 'cflags_cc': [ '-std=gnu++20' ], + 'cflags_cc!': [ '-std=gnu++17' ], + }], [ 'OS=="solaris"', { 'cflags': [ '-pthreads' ], 'ldflags': [ '-pthreads' ], @@ -634,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++', }, }],