Skip to content

Commit

Permalink
aarm
Browse files Browse the repository at this point in the history
  • Loading branch information
ibigbug committed Sep 21, 2023
1 parent 31e2fb7 commit 0717195
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ rustflags = ["--cfg", "tokio_unstable"]

[env]
BORING_BSSL_SOURCE_PATH = { value = "deps/boringssl/src", relative = true}
RUST_LOG= { value = "clash=trace" }
RUST_LOG= { value = "clash=trace" }

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
rustflags = ["-Clinker-flavor=gcc"]
14 changes: 14 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
#!/bin/sh

set -xe

[ ! -d "target/artifacts" ] && mkdir target/artifacts



for TARGET in $1; do
echo "building for $TARGET"
rustup target add $TARGET
case $TARGET in
aarch64-unknown-linux-gnu)
sudo apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
export BINDGEN_EXTRA_CLANG_ARGS='-I/usr/aarch64-linux-gnu/include'
;;
*)
;;
esac
cargo build -p clash --target $TARGET --release
mv ./target/$TARGET/release/clash ./target/artifacts/clash-$TARGET
done

0 comments on commit 0717195

Please sign in to comment.