rust: explicitly link against the real LLVM shared library
%ci:no-build
This commit is contained in:
parent
cf022e0f91
commit
a579370995
@ -43,11 +43,10 @@ termux_step_configure() {
|
||||
# for backtrace-sys
|
||||
export CC_x86_64_unknown_linux_gnu=gcc
|
||||
export CFLAGS_x86_64_unknown_linux_gnu="-O2"
|
||||
export LLVM_VERSION=$(grep ^TERMUX_PKG_VERSION= $TERMUX_PKG_BUILDER_DIR/../libllvm/build.sh | cut -f2 -d=)
|
||||
TERMUX_PKG_REVISION=1
|
||||
export LLVM_MAJOR_VERSION=$(. $TERMUX_SCRIPTDIR/packages/libllvm/build.sh; echo $LLVM_MAJOR_VERSION)
|
||||
unset CC CXX CPP LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS PKG_CONFIG RANLIB
|
||||
# we can't use -L$PREFIX/lib since it breaks things but we need to link against libLLVM-9.so
|
||||
ln -sf $PREFIX/lib/libLLVM-$LLVM_VERSION.so $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/$TERMUX_PKG_API_LEVEL/
|
||||
ln -sf $PREFIX/lib/libLLVM-$LLVM_MAJOR_VERSION.so $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/$TERMUX_PKG_API_LEVEL/
|
||||
|
||||
# rust checks libs in PREFIX/lib. It then can't find libc.so and libdl.so because rust program doesn't
|
||||
# know where those are. Putting them temporarly in $PREFIX/lib prevents that failure
|
||||
@ -90,9 +89,9 @@ termux_step_make_install() {
|
||||
rust-installer-version \
|
||||
manifest-* \
|
||||
x86_64-unknown-linux-gnu
|
||||
rm $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/$TERMUX_PKG_API_LEVEL/libLLVM-$LLVM_VERSION.so
|
||||
|
||||
rm $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/$TERMUX_PKG_API_LEVEL/libLLVM-$LLVM_MAJOR_VERSION.so
|
||||
}
|
||||
|
||||
termux_step_post_massage() {
|
||||
rm -f lib/libtinfo.so.6
|
||||
rm -f lib/libz.so
|
||||
|
Loading…
Reference in New Issue
Block a user