Skip to content
12 changes: 12 additions & 0 deletions recipes/recipes/llvm-tblgen/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

mkdir build
cd build
cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" ../llvm/
make llvm-tblgen clang-tblgen -j$(nproc --all)

mkdir -p $PREFIX/bin
cp bin/llvm-tblgen $PREFIX/bin/
cp bin/clang-tblgen $PREFIX/bin/
cp bin/llvm-lit $PREFIX/bin/
cp bin/llvm-min-tblgen $PREFIX/bin/
38 changes: 38 additions & 0 deletions recipes/recipes/llvm-tblgen/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
context:
version: 20.1.5

package:
name: llvm-tblgen
version: ${{ version }}

source:
url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${{ version
}}.tar.gz
sha256: 205c436f93a7e185cf9d63ae57e645f23561a4d1bf854f2c5bd78995a43a5c05

build:
number: 0

requirements:
build:
- cmake
- make # [unix]

tests:
- package_contents:
files:
- bin/llvm-tblgen
- bin/clang-tblgen

about:
license: Apache-2.0 WITH LLVM-exception
license_family: Apache
license_file: LICENSE.TXT
summary: The LLVM Project is a collection of modular and reusable compiler and toolchain
technologies.
homepage: https://llvm.org

extra:
recipe-maintainers:
- DerThorsten
- anutosh491
6 changes: 5 additions & 1 deletion recipes/recipes_emscripten/llvm/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

mkdir build
cd build

Expand Down Expand Up @@ -30,7 +32,9 @@ emcmake cmake ${CMAKE_ARGS} -S ../llvm -B . \
-DCLANG_ENABLE_ARCMT=OFF \
-DCLANG_ENABLE_BOOTSTRAP=OFF \
-DCLANG_BUILD_TOOLS=OFF \
-DCMAKE_CXX_FLAGS="-Dwait4=__syscall_wait4 -fexceptions"
-DCMAKE_CXX_FLAGS="-Dwait4=__syscall_wait4 -fexceptions" \
-DLLVM_TABLEGEN=$BUILD_PREFIX/bin/llvm-tblgen \
-DCLANG_TABLEGEN=$BUILD_PREFIX/bin/clang-tblgen

# Build and Install step
emmake make clangInterpreter lldWasm -j16 install
15 changes: 0 additions & 15 deletions recipes/recipes_emscripten/llvm/patches/cross_compile.patch

This file was deleted.

6 changes: 3 additions & 3 deletions recipes/recipes_emscripten/llvm/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ source:
}}.tar.gz
sha256: 205c436f93a7e185cf9d63ae57e645f23561a4d1bf854f2c5bd78995a43a5c05
patches:
- patches/cross_compile.patch
- patches/shift_temporary_files_to_tmp_dir.patch
- patches/enable_exception_handling.patch

build:
number: 0
number: 1

requirements:
build:
- ${{ compiler("c") }}
- ${{ compiler("cxx") }}
- cmake
- make # [unix]

- llvm-tblgen

tests:
- package_contents:
files:
Expand Down