opt: use cross to build armv7

This commit is contained in:
Kingtous
2023-03-27 15:26:20 +08:00
parent 260694fdaa
commit b8d8bf0a09
6 changed files with 190 additions and 33 deletions

21
Cross.toml Normal file
View File

@@ -0,0 +1,21 @@
[build]
build-std = false # do not build the std library. has precedence over xargo
xargo = true # enable the use of xargo by default
# zig = false # do not use zig cc for the builds
default-target = "x86_64-unknown-linux-gnu" # use this target if none is explicitly provided
[build.env]
volumes = ["VCPKG_ROOT"] # "VOL2_ARG=/path/to/volume"
passthrough = ["VCPKG_ROOT"]
[target.aarch64-unknown-linux-gnu]
# pre-build = ["env ARCH=arm64 ./res/install-rust-deps.sh"]
# build-std = false # always build the std library. has precedence over xargo
# xargo = false # disable the use of xargo
# image = "test-image" # use a different image for the target
# runner = "qemu-user" # wrapper to run the binary (must be `qemu-system`, `qemu-user`, or `native`).
[target.arm-unknown-linux-gnueabihf]
pre-build = "./res/install-rust-deps-arm.sh"
# volumes = ["VCPKG_ROOT"] # "VOL2_ARG=/path/to/volume"
# passthrough = ["VCPKG_ROOT"]