Skip to content

Commit a2cd2db

Browse files
neoxpertArGeoph
authored andcommitted
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 3228cc2 commit a2cd2db

File tree

5 files changed

+3221
-3252
lines changed

5 files changed

+3221
-3252
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 0 deletions
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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
'deps/sqlite3.gyp:sqlite3'
1313
],
1414
'sources': ['src/better_sqlite3.cpp'],
15-
'cflags_cc': ['-std=c++17'],
15+
'cflags_cc': ['-std=c++20'],
1616
'xcode_settings': {
17-
'OTHER_CPLUSPLUSFLAGS': ['-std=c++17', '-stdlib=libc++'],
17+
'OTHER_CPLUSPLUSFLAGS': ['-std=c++20', '-stdlib=libc++'],
1818
},
1919
'msvs_settings': {
2020
'VCCLCompilerTool': {
2121
'AdditionalOptions': [
22-
'/std:c++17',
22+
'/std:c++20',
2323
],
2424
},
2525
},

0 commit comments

Comments
 (0)