Skip to content

Commit 77336e5

Browse files
authored
[wip] Removed cross-compile patch from llvm-emscripten build (emscripten-forge#2339)
* removed cross-compile patch from llvm-emscripten build
1 parent 10a6062 commit 77336e5

File tree

5 files changed

+58
-19
lines changed

5 files changed

+58
-19
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
mkdir build
4+
cd build
5+
cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" ../llvm/
6+
make llvm-tblgen clang-tblgen -j$(nproc --all)
7+
8+
mkdir -p $PREFIX/bin
9+
cp bin/llvm-tblgen $PREFIX/bin/
10+
cp bin/clang-tblgen $PREFIX/bin/
11+
cp bin/llvm-lit $PREFIX/bin/
12+
cp bin/llvm-min-tblgen $PREFIX/bin/
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
context:
2+
version: 20.1.5
3+
4+
package:
5+
name: llvm-tblgen
6+
version: ${{ version }}
7+
8+
source:
9+
url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${{ version
10+
}}.tar.gz
11+
sha256: 205c436f93a7e185cf9d63ae57e645f23561a4d1bf854f2c5bd78995a43a5c05
12+
13+
build:
14+
number: 0
15+
16+
requirements:
17+
build:
18+
- cmake
19+
- make # [unix]
20+
21+
tests:
22+
- package_contents:
23+
files:
24+
- bin/llvm-tblgen
25+
- bin/clang-tblgen
26+
27+
about:
28+
license: Apache-2.0 WITH LLVM-exception
29+
license_family: Apache
30+
license_file: LICENSE.TXT
31+
summary: The LLVM Project is a collection of modular and reusable compiler and toolchain
32+
technologies.
33+
homepage: https://llvm.org
34+
35+
extra:
36+
recipe-maintainers:
37+
- DerThorsten
38+
- anutosh491

recipes/recipes_emscripten/llvm/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
mkdir build
24
cd build
35

@@ -30,7 +32,9 @@ emcmake cmake ${CMAKE_ARGS} -S ../llvm -B . \
3032
-DCLANG_ENABLE_ARCMT=OFF \
3133
-DCLANG_ENABLE_BOOTSTRAP=OFF \
3234
-DCLANG_BUILD_TOOLS=OFF \
33-
-DCMAKE_CXX_FLAGS="-Dwait4=__syscall_wait4 -fexceptions"
35+
-DCMAKE_CXX_FLAGS="-Dwait4=__syscall_wait4 -fexceptions" \
36+
-DLLVM_TABLEGEN=$BUILD_PREFIX/bin/llvm-tblgen \
37+
-DCLANG_TABLEGEN=$BUILD_PREFIX/bin/clang-tblgen
3438

3539
# Build and Install step
3640
emmake make clangInterpreter lldWasm -j16 install

recipes/recipes_emscripten/llvm/patches/cross_compile.patch

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

recipes/recipes_emscripten/llvm/recipe.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ source:
1010
}}.tar.gz
1111
sha256: 205c436f93a7e185cf9d63ae57e645f23561a4d1bf854f2c5bd78995a43a5c05
1212
patches:
13-
- patches/cross_compile.patch
1413
- patches/shift_temporary_files_to_tmp_dir.patch
1514
- patches/enable_exception_handling.patch
1615

1716
build:
18-
number: 0
17+
number: 1
1918

2019
requirements:
2120
build:
2221
- ${{ compiler("c") }}
2322
- ${{ compiler("cxx") }}
2423
- cmake
2524
- make # [unix]
26-
25+
- llvm-tblgen
26+
2727
tests:
2828
- package_contents:
2929
files:

0 commit comments

Comments
 (0)