Skip to content

Commit

Permalink
Build with clang-cl
Browse files Browse the repository at this point in the history
  • Loading branch information
prikolium-cfx committed Aug 20, 2024
1 parent 23dbe5b commit 0f323d4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
21 changes: 21 additions & 0 deletions patches/build_vs_2022.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0f323d4

Please sign in to comment.