Skip to content

Commit 192da21

Browse files
mcbartonvgvassilev
authored andcommitted
Remove cross compile patch for Unix systems
1 parent 6951212 commit 192da21

File tree

5 files changed

+22
-33
lines changed

5 files changed

+22
-33
lines changed

.github/workflows/emscripten.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ jobs:
218218
fi
219219
cd llvm-project
220220
# Build
221+
mkdir native_build
222+
cd native_build
223+
cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm/
224+
cmake --build . --target llvm-tblgen clang-tblgen --parallel $(nproc --all)
225+
export NATIVE_DIR=$PWD/bin/
226+
cd ..
221227
mkdir build
222228
if [[ "${cling_on}" == "ON" ]]; then
223229
cd build
@@ -243,6 +249,7 @@ jobs:
243249
-DLLVM_BUILD_TOOLS=OFF \
244250
-DLLVM_ENABLE_LIBPFM=OFF \
245251
-DCLANG_BUILD_TOOLS=OFF \
252+
-DLLVM_NATIVE_TOOL_DIR=$NATIVE_DIR \
246253
../llvm
247254
emmake ninja clang cling lld gtest_main
248255
else
@@ -273,10 +280,10 @@ jobs:
273280
-DLLVM_ENABLE_LIBPFM=OFF \
274281
-DCLANG_BUILD_TOOLS=OFF \
275282
-G Ninja \
283+
-DLLVM_NATIVE_TOOL_DIR=$NATIVE_DIR \
276284
../llvm
277285
emmake ninja libclang clangInterpreter clangStaticAnalyzerCore lldWasm
278286
fi
279-
rm -rf ./NATIVE/
280287
cd ../
281288
rm -rf $(find . -maxdepth 1 ! -name "build" ! -name "llvm" ! -name "clang" ! -name ".")
282289
if [[ "${cling_on}" == "ON" ]]; then

Emscripten-build-instructions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ git apply -v emscripten-clang20-2-shift-temporary-files-to-tmp-dir.patch
7171
We are now in a position to build an emscripten build of llvm by executing the following on Linux
7272
and osx
7373
```bash
74+
mkdir native_build
75+
cd native_build
76+
cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm/
77+
cmake --build . --target llvm-tblgen clang-tblgen --parallel $(nproc --all)
78+
export NATIVE_DIR=$PWD/bin/
79+
cd ..
7480
mkdir build
7581
cd build
7682
emcmake cmake -DCMAKE_BUILD_TYPE=Release \
@@ -92,6 +98,7 @@ emcmake cmake -DCMAKE_BUILD_TYPE=Release \
9298
-DLLVM_BUILD_TOOLS=OFF \
9399
-DLLVM_ENABLE_LIBPFM=OFF \
94100
-DCLANG_BUILD_TOOLS=OFF \
101+
-DLLVM_NATIVE_TOOL_DIR=$NATIVE_DIR \
95102
../llvm
96103
emmake make libclang -j $(nproc --all)
97104
emmake make clangInterpreter clangStaticAnalyzerCore -j $(nproc --all)

docs/Emscripten-build-instructions.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ and osx
9191

9292
.. code:: bash
9393
94+
mkdir native_build
95+
cd native_build
96+
cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm/
97+
cmake --build . --target llvm-tblgen clang-tblgen --parallel $(nproc --all)
98+
export NATIVE_DIR=$PWD/bin/
99+
cd ..
94100
mkdir build
95101
cd build
96102
emcmake cmake -DCMAKE_BUILD_TYPE=Release \
@@ -112,6 +118,7 @@ and osx
112118
-DLLVM_BUILD_TOOLS=OFF \
113119
-DLLVM_ENABLE_LIBPFM=OFF \
114120
-DCLANG_BUILD_TOOLS=OFF \
121+
-DLLVM_NATIVE_TOOL_DIR=$NATIVE_DIR \
115122
../llvm
116123
emmake make libclang -j $(nproc --all)
117124
emmake make clangInterpreter clangStaticAnalyzerCore -j $(nproc --all)

patches/llvm/emscripten-clang19-1-CrossCompile.patch

Lines changed: 0 additions & 16 deletions
This file was deleted.

patches/llvm/emscripten-clang20-1-CrossCompile.patch

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)