[#243] Support cross compiling for aarch64-unknown-linux-gnu

This commit is contained in:
Clement Wong
2020-05-13 23:50:10 +08:00
committed by ty
parent e218d513f4
commit a611d6d39d
4 changed files with 8 additions and 1 deletions
+1
View File
@@ -139,6 +139,7 @@ jobs:
docker build -t shadowsocks-rust:x86_64-pc-windows-gnu -f Dockerfile.x86_64-pc-windows-gnu .
docker build -t shadowsocks-rust:x86_64-unknown-linux-musl -f Dockerfile.x86_64-unknown-linux-musl .
docker build -t shadowsocks-rust:arm-unknown-linux-gnueabihf -f Dockerfile.arm-unknown-linux-gnueabihf .
docker build -t shadowsocks-rust:aarch64-unknown-linux-gnu -f Dockerfile.aarch64-unknown-linux-gnu .
- run: |
curl "https://sh.rustup.rs" -o "rust-init.sh"
chmod +x "rust-init.sh"
+3
View File
@@ -16,3 +16,6 @@ image = "shadowsocks-rust:x86_64-pc-windows-gnu"
[target.arm-unknown-linux-gnueabihf]
image = "shadowsocks-rust:arm-unknown-linux-gnueabihf"
[target.aarch64-unknown-linux-gnu]
image = "shadowsocks-rust:aarch64-unknown-linux-gnu"
@@ -0,0 +1,3 @@
FROM rustembedded/cross:aarch64-unknown-linux-gnu
ENV RUSTFLAGS="-Ctarget-feature=+aes"
+1 -1
View File
@@ -20,7 +20,7 @@ while getopts "t:" opt; do
done
if [[ "${#targets[@]}" == "0" ]]; then
targets=("x86_64-unknown-linux-musl" "x86_64-pc-windows-gnu" "arm-unknown-linux-gnueabihf")
targets=("x86_64-unknown-linux-musl" "x86_64-pc-windows-gnu" "arm-unknown-linux-gnueabihf" "aarch64-unknown-linux-gnu")
fi
function build() {