rust fix x86_64 build

This commit is contained in:
its-pointless 2020-09-05 11:55:09 +10:00 committed by its-pointless
parent 9f8ecacfb8
commit 73365fc175
1 changed files with 2 additions and 5 deletions

View File

@ -6,7 +6,7 @@ TERMUX_PKG_VERSION=1.46.0
TERMUX_PKG_SRCURL=https://static.rust-lang.org/dist/rustc-$TERMUX_PKG_VERSION-src.tar.xz
TERMUX_PKG_SHA256=865dae1290a205f16ded8818c6a0254cc32862985fc250a602a70285b7d92b82
TERMUX_PKG_DEPENDS="libc++, clang, openssl, lld, zlib, libllvm"
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
termux_step_configure() {
termux_setup_cmake
@ -50,10 +50,7 @@ termux_step_configure() {
# know where those are. Putting them temporarly in $PREFIX/lib prevents that failure
if [ $TERMUX_ARCH = "x86_64" ]; then
cp $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/x86_64-linux-android/$TERMUX_PKG_API_LEVEL/libc.so $TERMUX_PREFIX/lib/
cp $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/x86_64-linux-android/$TERMUX_PKG_API_LEVEL/libdl.so $TERMUX_PREFIX/lib/
mv $TERMUX_PREFIX/lib/libtinfo.so.6 $TERMUX_PREFIX/lib/libtinfo.so.6.tmp
export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/:/data/data/com.termux/files/usr/lib:$TERMUX_PKG_BUILDDIR/build/x86_64-unknown-linux-gnu/stage2/lib
fi
}
@ -63,7 +60,7 @@ termux_step_make() {
termux_step_make_install() {
if [ $TERMUX_ARCH = "x86_64" ]; then
mv $TERMUX_PREFIX ${TERMUX_PREFIX}a
$TERMUX_PKG_SRCDIR/x.py build cargo || $TERMUX_PKG_SRCDIR/x.py build rls || $TERMUX_PKG_SRCDIR/x.py build miri || $TERMUX_PKG_SRCDIR/x.py build cargo-miri || $TERMUX_PKG_SRCDIR/x.py build rustfmt || true
$TERMUX_PKG_SRCDIR/x.py build --stage 1 cargo || $TERMUX_PKG_SRCDIR/x.py build --stage 1 rls || $TERMUX_PKG_SRCDIR/x.py --stage 1 build miri || $TERMUX_PKG_SRCDIR/x.py build --stage 1 cargo-miri || $TERMUX_PKG_SRCDIR/x.py build --stage 1 rustfmt || $TERMUX_PKG_SRCDIR/x.py --stage 1 build rustdoc || $TERMUX_PKG_SRCDIR/x.py --stage 1 build error_index_generator || true
mv ${TERMUX_PREFIX}a ${TERMUX_PREFIX}
else
$TERMUX_PKG_SRCDIR/x.py build cargo || $TERMUX_PKG_SRCDIR/x.py build rls || $TERMUX_PKG_SRCDIR/x.py build miri || $TERMUX_PKG_SRCDIR/x.py build cargo-miri || $TERMUX_PKG_SRCDIR/x.py build rustfmt || true