From 9f0bc602e400c9e0da5962f8342ffccf1b54385e Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Tue, 25 May 2021 06:31:32 -0400 Subject: [PATCH] build: compile with --gnu++17 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enables C++17 features. PR-URL: https://github.com/nodejs/node/pull/38807 Refs: https://github.com/nodejs/node/pull/38788 Reviewed-By: Antoine du Hamel Reviewed-By: Jiawen Geng Reviewed-By: James M Snell Reviewed-By: Juan José Arboleda Reviewed-By: Michaël Zasso Reviewed-By: Ash Cripps --- common.gypi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index 9da5c37fb67324..3ad21b22551206 100644 --- a/common.gypi +++ b/common.gypi @@ -377,7 +377,7 @@ }], [ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', { 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], - 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++14' ], + 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ], 'defines': [ '__STDC_FORMAT_MACROS' ], 'ldflags': [ '-rdynamic' ], 'target_conditions': [ @@ -521,7 +521,7 @@ ['clang==1', { 'xcode_settings': { 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', - 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++14', # -std=gnu++14 + 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++17', # -std=gnu++17 'CLANG_CXX_LIBRARY': 'libc++', }, }],