Skip to content

Commit

Permalink
Support builds for Electron v32 (#1226)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
neoxpert authored Aug 13, 2024
1 parent 254b8e9 commit 6eb32eb
Show file tree
Hide file tree
Showing 5 changed files with 3,221 additions and 3,207 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ jobs:
run: brew install python-setuptools
- if: ${{ !startsWith(matrix.os, 'windows') && !startsWith(matrix.os, 'macos') }}
run: python3 -m pip install setuptools
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt update
sudo apt install gcc-10 g++-10 -y
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
- run: npm install --ignore-scripts
- run: npm run build-debug
- run: npm test
Expand Down Expand Up @@ -101,6 +106,11 @@ jobs:
run: brew install python-setuptools
- if: ${{ !startsWith(matrix.os, 'windows') && !startsWith(matrix.os, 'macos') }}
run: python3 -m pip install setuptools
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt update
sudo apt install gcc-10 g++-10 -y
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
- run: npm install --ignore-scripts
- run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
- run: ${{ env.ELECTRON_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
'target_name': 'better_sqlite3',
'dependencies': ['deps/sqlite3.gyp:sqlite3'],
'sources': ['src/better_sqlite3.cpp'],
'cflags_cc': ['-std=c++17'],
'cflags_cc': ['-std=c++20'],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': ['-std=c++17', '-stdlib=libc++'],
'OTHER_CPLUSPLUSFLAGS': ['-std=c++20', '-stdlib=libc++'],
},
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
'/std:c++17',
'/std:c++20',
],
},
},
Expand Down
Loading

0 comments on commit 6eb32eb

Please sign in to comment.