From 90f055fdaf512644a6503ae940becd6ce1a9c2ae Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Wed, 25 Oct 2017 16:49:21 -0400 Subject: [PATCH 1/3] build: use higher version c++ --- common.gypi | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/common.gypi b/common.gypi index c55c84f5cca41e..4262e4410e68e3 100644 --- a/common.gypi +++ b/common.gypi @@ -10,7 +10,9 @@ 'component%': 'static_library', # NB. these names match with what V8 expects 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way 'python%': 'python', - + 'gas_version%': 0, + 'llvm_version%': 0, + 'node_shared%': 'false', 'force_dynamic_crt%': 0, 'node_use_v8_platform%': 'true', @@ -211,6 +213,9 @@ # and their sheer number drowns out other, more legitimate warnings. 'DisableSpecificWarnings': ['4267'], 'WarnAsError': 'false', + 'AdditionalOptions': [ + '/std:c++14' + ], }, 'VCLibrarianTool': { }, @@ -293,7 +298,7 @@ }], [ 'OS in "linux freebsd openbsd solaris android aix"', { 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], - 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++0x' ], + 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ], 'ldflags': [ '-rdynamic' ], 'target_conditions': [ # The 1990s toolchain on SmartOS can't handle thin archives. @@ -409,7 +414,6 @@ ['clang==1', { 'xcode_settings': { 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', - 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', # -std=gnu++0x 'CLANG_CXX_LIBRARY': 'libc++', }, }], @@ -431,7 +435,12 @@ 'ldflags': [ '-Wl,--export-dynamic', ], - }] + }], + ['llvm_version != 0', { + 'cflags': [ '-std=c++14' ], + }, { + 'cflags': [ '-std=gnu++11' ], + }], ], } } From 076af6b4ea796e31ce92c21302dd94ac110bf1dd Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Wed, 25 Oct 2017 17:05:37 -0400 Subject: [PATCH 2/3] [sqwsh] only for C++ files --- common.gypi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index 4262e4410e68e3..fc22ada110aa74 100644 --- a/common.gypi +++ b/common.gypi @@ -437,9 +437,9 @@ ], }], ['llvm_version != 0', { - 'cflags': [ '-std=c++14' ], + 'cflags_cc': [ '-std=c++14' ], }, { - 'cflags': [ '-std=gnu++11' ], + 'cflags_cc': [ '-std=gnu++11' ], }], ], } From 198ae69f26541085ad0a002a2480836eef83e893 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Wed, 25 Oct 2017 22:48:14 -0400 Subject: [PATCH 3/3] [try] macOS plays hard to get --- common.gypi | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common.gypi b/common.gypi index fc22ada110aa74..c286821c7f53f9 100644 --- a/common.gypi +++ b/common.gypi @@ -200,6 +200,7 @@ # simply not feasible to squelch all warnings, never mind that the # libraries in deps/ are not under our control. 'cflags!': ['-Werror'], + 'cflags_cc': [ '-std=gnu++11' ], 'msvs_settings': { 'VCCLCompilerTool': { 'StringPooling': 'true', # pool string literals @@ -414,6 +415,7 @@ ['clang==1', { 'xcode_settings': { 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'CLANG_CXX_LANGUAGE_STANDARD': 'c++14', # -std=c++14 'CLANG_CXX_LIBRARY': 'libc++', }, }], @@ -436,11 +438,6 @@ '-Wl,--export-dynamic', ], }], - ['llvm_version != 0', { - 'cflags_cc': [ '-std=c++14' ], - }, { - 'cflags_cc': [ '-std=gnu++11' ], - }], ], } }