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
9 changes: 8 additions & 1 deletion .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ jobs:
fi
cd llvm-project
# Build
mkdir native_build
cd native_build
cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm/
cmake --build . --target llvm-tblgen clang-tblgen --parallel $(nproc --all)
export NATIVE_DIR=$PWD/bin/
cd ..
mkdir build
if [[ "${cling_on}" == "ON" ]]; then
cd build
Expand All @@ -243,6 +249,7 @@ jobs:
-DLLVM_BUILD_TOOLS=OFF \
-DLLVM_ENABLE_LIBPFM=OFF \
-DCLANG_BUILD_TOOLS=OFF \
-DLLVM_NATIVE_TOOL_DIR=$NATIVE_DIR \
../llvm
emmake ninja clang cling lld gtest_main
else
Expand Down Expand Up @@ -273,10 +280,10 @@ jobs:
-DLLVM_ENABLE_LIBPFM=OFF \
-DCLANG_BUILD_TOOLS=OFF \
-G Ninja \
-DLLVM_NATIVE_TOOL_DIR=$NATIVE_DIR \
../llvm
emmake ninja libclang clangInterpreter clangStaticAnalyzerCore lldWasm
fi
rm -rf ./NATIVE/
cd ../
rm -rf $(find . -maxdepth 1 ! -name "build" ! -name "llvm" ! -name "clang" ! -name ".")
if [[ "${cling_on}" == "ON" ]]; then
Expand Down
7 changes: 7 additions & 0 deletions Emscripten-build-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ 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
and osx
```bash
mkdir native_build
cd native_build
cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm/
cmake --build . --target llvm-tblgen clang-tblgen --parallel $(nproc --all)
export NATIVE_DIR=$PWD/bin/
cd ..
mkdir build
cd build
emcmake cmake -DCMAKE_BUILD_TYPE=Release \
Expand All @@ -92,6 +98,7 @@ emcmake cmake -DCMAKE_BUILD_TYPE=Release \
-DLLVM_BUILD_TOOLS=OFF \
-DLLVM_ENABLE_LIBPFM=OFF \
-DCLANG_BUILD_TOOLS=OFF \
-DLLVM_NATIVE_TOOL_DIR=$NATIVE_DIR \
../llvm
emmake make libclang -j $(nproc --all)
emmake make clangInterpreter clangStaticAnalyzerCore -j $(nproc --all)
Expand Down
7 changes: 7 additions & 0 deletions docs/Emscripten-build-instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ and osx

.. code:: bash

mkdir native_build
cd native_build
cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm/
cmake --build . --target llvm-tblgen clang-tblgen --parallel $(nproc --all)
export NATIVE_DIR=$PWD/bin/
cd ..
mkdir build
cd build
emcmake cmake -DCMAKE_BUILD_TYPE=Release \
Expand All @@ -112,6 +118,7 @@ and osx
-DLLVM_BUILD_TOOLS=OFF \
-DLLVM_ENABLE_LIBPFM=OFF \
-DCLANG_BUILD_TOOLS=OFF \
-DLLVM_NATIVE_TOOL_DIR=$NATIVE_DIR \
../llvm
emmake make libclang -j $(nproc --all)
emmake make clangInterpreter clangStaticAnalyzerCore -j $(nproc --all)
Expand Down
16 changes: 0 additions & 16 deletions patches/llvm/emscripten-clang19-1-CrossCompile.patch

This file was deleted.

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

This file was deleted.

Loading