Skip to content
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
12 changes: 9 additions & 3 deletions .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,13 @@ jobs:

cd llvm-project
# Build
mkdir native_build
cd native_build
cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release -G Ninja ../llvm/
cmake --build . --target llvm-tblgen clang-tblgen --parallel $(nproc --all)
$env:PWD_DIR= $PWD.Path
$env:NATIVE_DIR="$env:PWD_DIR/bin/"
cd ..
mkdir build
if ( "${{ matrix.cling }}" -imatch "On" )
{
Expand All @@ -295,23 +302,21 @@ jobs:
-DLLVM_BUILD_TOOLS=OFF `
-DLLVM_ENABLE_LIBPFM=OFF `
-DCLANG_BUILD_TOOLS=OFF `
-DLLVM_NATIVE_TOOL_DIR="$env:NATIVE_DIR" `
..\llvm
emmake make clang cling lld gtest_main
}
else
{
cp -r ..\patches\llvm\emscripten-clang${{ matrix.clang-runtime }}*
cp -r ..\patches\llvm\Windows-emscripten-clang${{ matrix.clang-runtime }}*
#FIXME: Apply patches without hardcoding
if ( "${{ matrix.clang-runtime }}" -imatch "19" )
{
git apply -v Windows-emscripten-clang19-1-CrossCompile.patch
git apply -v emscripten-clang19-2-shift-temporary-files-to-tmp-dir.patch
git apply -v emscripten-clang19-3-remove-zdefs.patch
}
elseif ( "${{ matrix.clang-runtime }}" -imatch "20" )
{
git apply -v Windows-emscripten-clang20-1-CrossCompile.patch
git apply -v emscripten-clang20-2-shift-temporary-files-to-tmp-dir.patch
}
cd build
Expand All @@ -336,6 +341,7 @@ jobs:
-DLLVM_ENABLE_LIBPFM=OFF `
-DCLANG_BUILD_TOOLS=OFF `
-G Ninja `
-DLLVM_NATIVE_TOOL_DIR="$env:NATIVE_DIR" `
..\llvm
emmake ninja libclang clangInterpreter clangStaticAnalyzerCore lldWasm
}
Expand Down
10 changes: 8 additions & 2 deletions Emscripten-build-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ On Windows execute the following
```powershell
cd .\llvm-project\
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 @@ -108,6 +106,13 @@ emmake make lldWasm -j $(nproc --all)
or executing

```powershell
mkdir native_build
cd native_build
cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release -G Ninja ../llvm/
cmake --build . --target llvm-tblgen clang-tblgen --parallel $(nproc --all)
$env:PWD_DIR= $PWD.Path
$env:NATIVE_DIR="$env:PWD_DIR/bin/"
cd ..
mkdir build
cd build
emcmake cmake -DCMAKE_BUILD_TYPE=Release `
Expand All @@ -129,6 +134,7 @@ emcmake cmake -DCMAKE_BUILD_TYPE=Release `
-DLLVM_BUILD_TOOLS=OFF `
-DLLVM_ENABLE_LIBPFM=OFF `
-DCLANG_BUILD_TOOLS=OFF `
-DLLVM_NATIVE_TOOL_DIR="$env:NATIVE_DIR" `
-G Ninja `
..\llvm
emmake ninja libclang clangInterpreter clangStaticAnalyzerCore lldWasm
Expand Down
10 changes: 8 additions & 2 deletions docs/Emscripten-build-instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ On Windows execute the following

cd .\llvm-project\
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

We are now in a position to build an emscripten build of llvm by executing the following on Linux
Expand Down Expand Up @@ -128,6 +126,13 @@ or executing

.. code:: powershell

mkdir native_build
cd native_build
cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release -G Ninja ../llvm/
cmake --build . --target llvm-tblgen clang-tblgen --parallel $(nproc --all)
$env:PWD_DIR= $PWD.Path
$env:NATIVE_DIR="$env:PWD_DIR/bin/"
cd ..
mkdir build
cd build
emcmake cmake -DCMAKE_BUILD_TYPE=Release `
Expand All @@ -149,6 +154,7 @@ or executing
-DLLVM_BUILD_TOOLS=OFF `
-DLLVM_ENABLE_LIBPFM=OFF `
-DCLANG_BUILD_TOOLS=OFF `
-DLLVM_NATIVE_TOOL_DIR="$env:NATIVE_DIR" `
-G Ninja `
..\llvm
emmake ninja libclang clangInterpreter clangStaticAnalyzerCore lldWasm
Expand Down
20 changes: 0 additions & 20 deletions patches/llvm/Windows-emscripten-clang19-1-CrossCompile.patch

This file was deleted.

20 changes: 0 additions & 20 deletions patches/llvm/Windows-emscripten-clang20-1-CrossCompile.patch

This file was deleted.

Loading