diff --git a/socks5-c/.config/config b/socks5-c/.config/config new file mode 100644 index 0000000000..e3a70025c3 --- /dev/null +++ b/socks5-c/.config/config @@ -0,0 +1,3 @@ +[target.x86_64-linux-android] +linker = "${NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android33-clang" +ar = "${NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" diff --git a/socks5-c/build.sh b/socks5-c/build.sh new file mode 100755 index 0000000000..e6678b5143 --- /dev/null +++ b/socks5-c/build.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +export API=33 +export TOOLCHAIN="$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64" +export TARGET_CC="$TOOLCHAIN/bin/x86_64-linux-android$API-clang" +export TARGET_AR="$TOOLCHAIN/bin/llvm-ar" +export PATH="$TOOLCHAIN/bin/:$PATH" +export RANLIB="$TOOLCHAIN/bin/llvm-ranlib" + +cargo build --lib --target x86_64-linux-android