libllvm: add mlir
This commit is contained in:
parent
0fe298fd86
commit
61d08372ff
@ -23,7 +23,7 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
|||||||
-DANDROID_PLATFORM_LEVEL=$TERMUX_PKG_API_LEVEL
|
-DANDROID_PLATFORM_LEVEL=$TERMUX_PKG_API_LEVEL
|
||||||
-DPYTHON_EXECUTABLE=$(command -v python3)
|
-DPYTHON_EXECUTABLE=$(command -v python3)
|
||||||
-DLLVM_ENABLE_PIC=ON
|
-DLLVM_ENABLE_PIC=ON
|
||||||
-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;compiler-rt;lld;lldb;openmp;polly
|
-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;compiler-rt;lld;lldb;mlir;openmp;polly
|
||||||
-DLLVM_ENABLE_LIBEDIT=OFF
|
-DLLVM_ENABLE_LIBEDIT=OFF
|
||||||
-DLLVM_INCLUDE_TESTS=OFF
|
-DLLVM_INCLUDE_TESTS=OFF
|
||||||
-DCLANG_DEFAULT_CXX_STDLIB=libc++
|
-DCLANG_DEFAULT_CXX_STDLIB=libc++
|
||||||
@ -34,9 +34,10 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
|||||||
-DDEFAULT_SYSROOT=$(dirname $TERMUX_PREFIX)
|
-DDEFAULT_SYSROOT=$(dirname $TERMUX_PREFIX)
|
||||||
-DLLVM_LINK_LLVM_DYLIB=ON
|
-DLLVM_LINK_LLVM_DYLIB=ON
|
||||||
-DLLDB_ENABLE_PYTHON=OFF
|
-DLLDB_ENABLE_PYTHON=OFF
|
||||||
|
-DCLANG_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/clang-tblgen
|
||||||
-DLLDB_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/lldb-tblgen
|
-DLLDB_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/lldb-tblgen
|
||||||
-DLLVM_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-tblgen
|
-DLLVM_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-tblgen
|
||||||
-DCLANG_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/clang-tblgen
|
-DMLIR_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/mlir-tblgen
|
||||||
-DLIBOMP_ENABLE_SHARED=FALSE
|
-DLIBOMP_ENABLE_SHARED=FALSE
|
||||||
-DOPENMP_ENABLE_LIBOMPTARGET=OFF
|
-DOPENMP_ENABLE_LIBOMPTARGET=OFF
|
||||||
-DLLVM_ENABLE_SPHINX=ON
|
-DLLVM_ENABLE_SPHINX=ON
|
||||||
@ -47,6 +48,8 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
|||||||
-DPERL_EXECUTABLE=$(command -v perl)
|
-DPERL_EXECUTABLE=$(command -v perl)
|
||||||
-DLLVM_ENABLE_FFI=ON
|
-DLLVM_ENABLE_FFI=ON
|
||||||
-DLLVM_INSTALL_UTILS=ON
|
-DLLVM_INSTALL_UTILS=ON
|
||||||
|
-DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF
|
||||||
|
-DMLIR_LINALG_ODS_YAML_GEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/mlir-linalg-ods-yaml-gen
|
||||||
"
|
"
|
||||||
|
|
||||||
if [ $TERMUX_ARCH_BITS = 32 ]; then
|
if [ $TERMUX_ARCH_BITS = 32 ]; then
|
||||||
@ -64,8 +67,8 @@ termux_step_host_build() {
|
|||||||
termux_setup_cmake
|
termux_setup_cmake
|
||||||
termux_setup_ninja
|
termux_setup_ninja
|
||||||
|
|
||||||
cmake -G Ninja -DLLVM_ENABLE_PROJECTS='clang;lldb' $TERMUX_PKG_SRCDIR/llvm
|
cmake -G Ninja -DLLVM_ENABLE_PROJECTS='clang;lldb;mlir' $TERMUX_PKG_SRCDIR/llvm
|
||||||
ninja -j $TERMUX_MAKE_PROCESSES clang-tblgen lldb-tblgen llvm-tblgen
|
ninja -j $TERMUX_MAKE_PROCESSES clang-tblgen lldb-tblgen llvm-tblgen mlir-tblgen mlir-linalg-ods-yaml-gen
|
||||||
}
|
}
|
||||||
|
|
||||||
termux_step_pre_configure() {
|
termux_step_pre_configure() {
|
||||||
|
9
packages/libllvm/mlir.subpackage.sh
Normal file
9
packages/libllvm/mlir.subpackage.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
TERMUX_SUBPKG_INCLUDE="
|
||||||
|
bin/mlir-*
|
||||||
|
include/mlir*
|
||||||
|
lib/cmake/mlir/
|
||||||
|
lib/libMLIR.so
|
||||||
|
lib/libmlir*so
|
||||||
|
"
|
||||||
|
TERMUX_SUBPKG_DESCRIPTION="A Multi-Level Intermediate Representation for compilers from LLVM"
|
||||||
|
TERMUX_SUBPKG_DEPENDS="libc++, ncurses"
|
Loading…
x
Reference in New Issue
Block a user