Skip to content

Commit 6eb32eb

Browse files
authored
Support builds for Electron v32 (WiseLibs#1226)
* use c++20 required by v8 * adjust macro and method signatures * replace SetAccessor with SetNativeDataProperty * use old signatures for older node version * install g++ 10 on ubuntu
1 parent 254b8e9 commit 6eb32eb

File tree

5 files changed

+3221
-3207
lines changed

5 files changed

+3221
-3207
lines changed

.github/workflows/build.yml

+10
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ jobs:
4848
run: brew install python-setuptools
4949
- if: ${{ !startsWith(matrix.os, 'windows') && !startsWith(matrix.os, 'macos') }}
5050
run: python3 -m pip install setuptools
51+
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
52+
run: |
53+
sudo apt update
54+
sudo apt install gcc-10 g++-10 -y
55+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
5156
- run: npm install --ignore-scripts
5257
- run: npm run build-debug
5358
- run: npm test
@@ -101,6 +106,11 @@ jobs:
101106
run: brew install python-setuptools
102107
- if: ${{ !startsWith(matrix.os, 'windows') && !startsWith(matrix.os, 'macos') }}
103108
run: python3 -m pip install setuptools
109+
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
110+
run: |
111+
sudo apt update
112+
sudo apt install gcc-10 g++-10 -y
113+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
104114
- run: npm install --ignore-scripts
105115
- run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
106116
- run: ${{ env.ELECTRON_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}

binding.gyp

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
'target_name': 'better_sqlite3',
1010
'dependencies': ['deps/sqlite3.gyp:sqlite3'],
1111
'sources': ['src/better_sqlite3.cpp'],
12-
'cflags_cc': ['-std=c++17'],
12+
'cflags_cc': ['-std=c++20'],
1313
'xcode_settings': {
14-
'OTHER_CPLUSPLUSFLAGS': ['-std=c++17', '-stdlib=libc++'],
14+
'OTHER_CPLUSPLUSFLAGS': ['-std=c++20', '-stdlib=libc++'],
1515
},
1616
'msvs_settings': {
1717
'VCCLCompilerTool': {
1818
'AdditionalOptions': [
19-
'/std:c++17',
19+
'/std:c++20',
2020
],
2121
},
2222
},

0 commit comments

Comments
 (0)