0
0
mirror of https://github.com/termux-pacman/glibc-packages.git synced 2024-11-27 06:08:57 +00:00
glibc-packages/gpkg/lld/build.sh
Max Ivan e9124d3de4
update llvm packages (#304)
gpkg/clang
gpkg/compiler-rt
gpkg/libclc
gpkg/lld
gpkg/llvm
2024-11-08 09:04:55 +03:00

51 lines
1.9 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://llvm.org/
TERMUX_PKG_DESCRIPTION="Linker from the LLVM project"
TERMUX_PKG_LICENSE="Apache-2.0, NCSA"
TERMUX_PKG_LICENSE_FILE="LICENSE.TXT"
TERMUX_PKG_MAINTAINER="@termux-pacman"
TERMUX_PKG_VERSION=19.1.3
_SOURCE=https://github.com/llvm/llvm-project/releases/download/llvmorg-$TERMUX_PKG_VERSION
TERMUX_PKG_SRCURL=($_SOURCE/lld-$TERMUX_PKG_VERSION.src.tar.xz
$_SOURCE/llvm-$TERMUX_PKG_VERSION.src.tar.xz
$_SOURCE/libunwind-$TERMUX_PKG_VERSION.src.tar.xz
$_SOURCE/cmake-$TERMUX_PKG_VERSION.src.tar.xz)
TERMUX_PKG_SHA256=(74b7785f5ae03ffe8af71b76eebbb192ac722af2189bed96e8693bd694d1f7fd
11e166d0f291a53cfc6b9e58abd1d7954de32ebc37672987612d3b7075d88411
88b4dae401349293ac58308cdf80af39acc8e22e51e1419a79782a3731ff59fb
4c55aa6e77fc0e8b759bca2c79ee4fd0ea8c7fab06eeea09310ae1e954a0af5e)
TERMUX_PKG_DEPENDS="libllvm-glibc, gcc-libs-glibc, zlib-glibc, zstd-glibc"
TERMUX_PKG_BUILD_DEPENDS="llvm-glibc"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DLLVM_HOST_TRIPLE=$TERMUX_HOST_PLATFORM
-DCMAKE_LIBRARY_ARCHITECTURE=$TERMUX_HOST_PLATFORM
-DCMAKE_INSTALL_DOCDIR=share/doc
-DCMAKE_SKIP_RPATH=ON
-DBUILD_SHARED_LIBS=ON
-DLLVM_BUILD_DOCS=ON
-DLLVM_ENABLE_SPHINX=ON
-DLLVM_EXTERNAL_LIT=$TERMUX_PREFIX/bin/lit
-DLLVM_MAIN_SRC_DIR=$TERMUX_TOPDIR/$TERMUX_PKG_NAME/llvm
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_LINK_LLVM_DYLIB=ON
-DSPHINX_WARNINGS_AS_ERRORS=OFF
"
termux_step_post_get_source() {
for i in llvm libunwind cmake; do
rm -fr $TERMUX_TOPDIR/$TERMUX_PKG_NAME/${i}
mv $TERMUX_PKG_SRCDIR/$i-$TERMUX_PKG_VERSION.src $TERMUX_TOPDIR/$TERMUX_PKG_NAME
mv $TERMUX_TOPDIR/$TERMUX_PKG_NAME/$i-$TERMUX_PKG_VERSION.src $TERMUX_TOPDIR/$TERMUX_PKG_NAME/$i
done
}
termux_step_pre_configure() {
local LLVM_TARGET_ARCH="X86"
if [ $TERMUX_ARCH = "arm" ]; then
LLVM_TARGET_ARCH="ARM"
elif [ $TERMUX_ARCH = "aarch64" ]; then
LLVM_TARGET_ARCH="AArch64"
fi
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DCMAKE_SYSTEM_PROCESSOR=${LLVM_TARGET_ARCH}"
}