Skip to content

Commit fe4ce3a

Browse files
authored
Adopt C++14 (WiseLibs#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.
1 parent 03f382a commit fe4ce3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

binding.gyp

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
'target_name': 'better_sqlite3',
1010
'dependencies': ['deps/sqlite3.gyp:sqlite3'],
1111
'sources': ['src/better_sqlite3.cpp'],
12-
'cflags': ['-std=c++11'],
12+
'cflags': ['-std=c++14'],
1313
'xcode_settings': {
14-
'OTHER_CPLUSPLUSFLAGS': ['-std=c++11', '-stdlib=libc++'],
14+
'OTHER_CPLUSPLUSFLAGS': ['-std=c++14', '-stdlib=libc++'],
1515
},
1616
},
1717
{

0 commit comments

Comments
 (0)