diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb4bfdc..2fc73c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,6 +38,7 @@ jobs: git apply --reject --whitespace=fix ../patches/internal_modules.patch git apply --reject --whitespace=fix ../patches/rename_output.patch git apply --reject --whitespace=fix ../patches/version_suffix.patch + git apply --reject --whitespace=fix ../patches/build_vs_2022.patch - name: Build project if: runner.os != 'Windows' @@ -59,7 +60,7 @@ jobs: if: runner.os == 'Windows' shell: bash working-directory: ./node - run: ./vcbuild.bat release x64 dll no-cctest + run: ./vcbuild.bat release x64 dll no-cctest clang-cl - name: Upload artifacts uses: actions/upload-artifact@v4 @@ -80,10 +81,10 @@ jobs: uses: softprops/action-gh-release@v2 with: files: | - ${{ github.workspace }}/libnode-Windows-x64/libnode20.dll - ${{ github.workspace }}/libnode-Windows-x64/libnode20.lib - ${{ github.workspace }}/libnode-Windows-x64/libnode20.pdb - ${{ github.workspace }}/libnode-Linux-x64/libnode20.so + ${{ github.workspace }}/libnode-Windows-x64/libnode22.dll + ${{ github.workspace }}/libnode-Windows-x64/libnode22.lib + ${{ github.workspace }}/libnode-Windows-x64/libnode22.pdb + ${{ github.workspace }}/libnode-Linux-x64/libnode22.so - name: Delete artifacts uses: geekyeggo/delete-artifact@v5 diff --git a/patches/build_vs_2022.patch b/patches/build_vs_2022.patch new file mode 100644 index 0000000..39a7209 --- /dev/null +++ b/patches/build_vs_2022.patch @@ -0,0 +1,21 @@ +diff --git forkSrcPrefix/vcbuild.bat forkDstPrefix/vcbuild.bat +index 428577c5c3d1e9ab55285d7d985fc06ec0ac1dd4..562588ade19d7688a5fd260a38b9ecff10a537bb 100644 +--- forkSrcPrefix/vcbuild.bat ++++ forkDstPrefix/vcbuild.bat +@@ -283,11 +283,11 @@ goto exit + + @rem Visual Studio v17.10 has a bug that causes the build to fail. + @rem Check if the version is v17.10 and exit if it is. +-echo %VSCMD_VER% | findstr /b /c:"17.10" >nul +-if %errorlevel% neq 1 ( +- echo Node.js doesn't compile with Visual Studio 17.10 Please use a different version. +- goto exit +-) ++@rem echo %VSCMD_VER% | findstr /b /c:"17.10" >nul ++@rem if %errorlevel% neq 1 ( ++@rem echo Node.js doesn't compile with Visual Studio 17.10 Please use a different version. ++@rem goto exit ++@rem ) + + @rem check if the clang-cl build is requested + if not defined clang_cl goto clang-skip diff --git a/patches/enable_rtti.patch b/patches/enable_rtti.patch index ddb53f3..433561e 100644 --- a/patches/enable_rtti.patch +++ b/patches/enable_rtti.patch @@ -1,5 +1,5 @@ diff --git forkSrcPrefix/common.gypi forkDstPrefix/common.gypi -index 32a298414b5392f0d083f573f129fdc6dac85cfd..9fb52bf9a6242d0437c4d6c333748899d41e370e 100644 +index 32a298414b5392f0d083f573f129fdc6dac85cfd..4bfda1278552aaf3364b2c9612e205040eb9e464 100644 --- forkSrcPrefix/common.gypi +++ forkDstPrefix/common.gypi @@ -489,7 +489,7 @@ @@ -7,7 +7,7 @@ index 32a298414b5392f0d083f573f129fdc6dac85cfd..9fb52bf9a6242d0437c4d6c333748899 [ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', { 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], - 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ], -+ 'cflags_cc': [ '-fno-exceptions' ], ++ 'cflags_cc': [ '-fno-exceptions', '-std=gnu++20' ], 'defines': [ '__STDC_FORMAT_MACROS' ], 'ldflags': [ '-rdynamic' ], 'target_conditions': [