Browse Source

Use local vars

android-5
Kevin Cotugno 6 years ago
committed by Fredrik Fornwall
parent
commit
9232d01b2c
  1. 6
      packages/rust/build.sh
  2. 6
      packages/rust/config.toml

6
packages/rust/build.sh

@ -9,15 +9,15 @@ termux_step_configure () {
termux_setup_cmake
if [ "$TERMUX_ARCH" = "arm" ]; then
TRIPLE="armv7-linux-androideabi"
local triple="armv7-linux-androideabi"
else
TRIPLE="$TERMUX_HOST_PLATFORM"
local triple="$TERMUX_HOST_PLATFORM"
fi
sed "s%\\@TERMUX_PREFIX\\@%$TERMUX_PREFIX%g" \
$TERMUX_PKG_BUILDER_DIR/config.toml \
| sed "s%\\@TERMUX_STANDALONE_TOOLCHAIN\\@%$TERMUX_STANDALONE_TOOLCHAIN%g" \
| sed "s%\\@TRIPLE\\@%$TRIPLE%g" \
| sed "s%\\@triple\\@%$triple%g" \
> config.toml
export LD_LIBRARY_PATH=$TERMUX_PKG_BUILDDIR/build/x86_64-unknown-linux-gnu/llvm/lib

6
packages/rust/config.toml

@ -2,8 +2,8 @@
link-shared = true
[build]
host = ["@TRIPLE@"]
target = ["@TRIPLE@"]
host = ["@triple@"]
target = ["@triple@"]
python = "python2.7"
extended = true
@ -25,7 +25,7 @@ channel = "stable"
rpath = false
[target.@TRIPLE@]
[target.@triple@]
android-ndk = "@TERMUX_STANDALONE_TOOLCHAIN@"
llvm-config = "@TERMUX_PREFIX@/bin/llvm-config"

Loading…
Cancel
Save