From a7e4f4d1530474bcbcd3349654bdf4a0fb172113 Mon Sep 17 00:00:00 2001 From: pierre Date: Fri, 12 May 2023 17:37:55 +0200 Subject: [PATCH] add build script --- socks5-c/.config/config | 3 +++ socks5-c/build.sh | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 socks5-c/.config/config create mode 100755 socks5-c/build.sh 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