From fe4ce3ac4882b2a98a9adc58911226228409ccb1 Mon Sep 17 00:00:00 2001 From: Paul Rosania Date: Sat, 19 Dec 2020 10:56:02 -0800 Subject: [PATCH] Adopt C++14 (#497) V8 has required C++14 since ~2017. It appears that changes in recent V8 versions (8.6+) have brought C++14 features into the parts of V8 that `better-sqlite3` builds against, causing native module compilation to fail. (I observed this when updating from Electron 10, which uses V8 8.5, to Electron 11, which uses V8 8.7.) Updating to the C++14 standard resolves this issue and gets `better-sqlite3` building again. --- binding.gyp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/binding.gyp b/binding.gyp index 467fa1bc3..06bbc9843 100644 --- a/binding.gyp +++ b/binding.gyp @@ -9,9 +9,9 @@ 'target_name': 'better_sqlite3', 'dependencies': ['deps/sqlite3.gyp:sqlite3'], 'sources': ['src/better_sqlite3.cpp'], - 'cflags': ['-std=c++11'], + 'cflags': ['-std=c++14'], 'xcode_settings': { - 'OTHER_CPLUSPLUSFLAGS': ['-std=c++11', '-stdlib=libc++'], + 'OTHER_CPLUSPLUSFLAGS': ['-std=c++14', '-stdlib=libc++'], }, }, {