Skip to content

Fix Windows Emscripten build instructions #573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Emscripten-build-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ On Windows execute the following

```powershell
cd .\llvm-project\
cp -r ..\patches\llvm\emscripten-clang${{ matrix.clang-runtime }}*
cp -r ..\patches\llvm\Windows-emscripten-clang${{ matrix.clang-runtime }}*
cp -r ..\patches\llvm\emscripten-clang20*
cp -r ..\patches\llvm\Windows-emscripten-clang20*
git apply -v Windows-emscripten-clang20-1-CrossCompile.patch
git apply -v emscripten-clang20-2-shift-temporary-files-to-tmp-dir.patch
```
Expand Down Expand Up @@ -106,9 +106,9 @@ cd build
emcmake cmake -DCMAKE_BUILD_TYPE=Release `
-DLLVM_HOST_TRIPLE=wasm32-unknown-emscripten `
-DLLVM_ENABLE_ASSERTIONS=ON `
-DLLVM_TARGETS_TO_BUILD="${{ matrix.llvm_targets_to_build }}" `
-DLLVM_TARGETS_TO_BUILD="WebAssembly" `
-DLLVM_ENABLE_LIBEDIT=OFF `
-DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects }}" `
-DLLVM_ENABLE_PROJECTS="clang;lld" `
-DLLVM_ENABLE_ZSTD=OFF `
-DLLVM_ENABLE_LIBXML2=OFF `
-DCLANG_ENABLE_STATIC_ANALYZER=OFF `
Expand Down Expand Up @@ -185,13 +185,12 @@ emmake make -j $(nproc --all) check-cppinterop
To build and test your Emscripten build of CppInterOp on Windows execute the following

```powershell
emcmake cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
emcmake cmake -DCMAKE_BUILD_TYPE=Release `
-DCMAKE_PREFIX_PATH="$env:PREFIX" `
-DLLVM_DIR="$env:LLVM_BUILD_DIR\lib\cmake\llvm" `
-DLLD_DIR="$env:LLVM_BUILD_DIR\lib\cmake\lld" `
-DClang_DIR="$env:LLVM_BUILD_DIR\lib\cmake\clang" `
-DBUILD_SHARED_LIBS=ON `
-DCODE_COVERAGE=${{ env.CODE_COVERAGE }} `
-DCMAKE_INSTALL_PREFIX="$env:PREFIX" `
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON `
-DLLVM_ENABLE_WERROR=On `
Expand Down
11 changes: 5 additions & 6 deletions docs/Emscripten-build-instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ On Windows execute the following
.. code:: powershell

cd .\llvm-project\
cp -r ..\patches\llvm\emscripten-clang${{ matrix.clang-runtime }}*
cp -r ..\patches\llvm\Windows-emscripten-clang${{ matrix.clang-runtime }}*
cp -r ..\patches\llvm\emscripten-clang20*
cp -r ..\patches\llvm\Windows-emscripten-clang20*
git apply -v Windows-emscripten-clang20-1-CrossCompile.patch
git apply -v emscripten-clang20-2-shift-temporary-files-to-tmp-dir.patch

Expand Down Expand Up @@ -122,9 +122,9 @@ or executing
emcmake cmake -DCMAKE_BUILD_TYPE=Release `
-DLLVM_HOST_TRIPLE=wasm32-unknown-emscripten `
-DLLVM_ENABLE_ASSERTIONS=ON `
-DLLVM_TARGETS_TO_BUILD="${{ matrix.llvm_targets_to_build }}" `
-DLLVM_TARGETS_TO_BUILD="WebAssembly" `
-DLLVM_ENABLE_LIBEDIT=OFF `
-DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects }}" `
-DLLVM_ENABLE_PROJECTS="clang;lld" `
-DLLVM_ENABLE_ZSTD=OFF `
-DLLVM_ENABLE_LIBXML2=OFF `
-DCLANG_ENABLE_STATIC_ANALYZER=OFF `
Expand Down Expand Up @@ -206,13 +206,12 @@ To build and test your Emscripten build of CppInterOp on Windows execute the fol

.. code:: powershell

emcmake cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
emcmake cmake -DCMAKE_BUILD_TYPE=Release `
-DCMAKE_PREFIX_PATH="$env:PREFIX" `
-DLLVM_DIR="$env:LLVM_BUILD_DIR\lib\cmake\llvm" `
-DLLD_DIR="$env:LLVM_BUILD_DIR\lib\cmake\lld" `
-DClang_DIR="$env:LLVM_BUILD_DIR\lib\cmake\clang" `
-DBUILD_SHARED_LIBS=ON `
-DCODE_COVERAGE=${{ env.CODE_COVERAGE }} `
-DCMAKE_INSTALL_PREFIX="$env:PREFIX" `
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON `
-DLLVM_ENABLE_WERROR=On `
Expand Down
Loading