diff options
author | rachitchokshi <rachitchokshi@gmail.com> | 2018-09-08 14:23:14 -0700 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2018-09-10 21:24:15 +0200 |
commit | 1b6df8a4802cd4580f515cf63756dad1649290fe (patch) | |
tree | 9d012e29521d9d92eb8b966d1c81bd7c1be5528a | |
parent | d6c8fee04419cf6fb69e51fd62aacc32f83bfef8 (diff) |
Enabled build target aarch64-unknown-linux-gnu for arm64 architecture
-rw-r--r-- | .travis.yml | 8 | ||||
-rw-r--r-- | Cargo.toml | 1 | ||||
-rwxr-xr-x | ci/before_install.bash | 8 | ||||
-rwxr-xr-x | ci/script.bash | 2 |
4 files changed, 17 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index 28478f22..100f54fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,13 @@ matrix: - TARGET=arm-unknown-linux-gnueabihf - CC_arm_unknown_linux_gnueabihf=/usr/bin/arm-linux-gnueabihf-gcc-4.8 - CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc-4.8 - + - os: linux + rust: stable + env: + - TARGET=aarch64-unknown-linux-gnu + - CC_aarch64-unknown-linux-gnu=/usr/bin/aarch64-linux-gnu-gcc-4.8 + - CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc-4.8 + # Minimum Rust supported channel. - os: linux rust: 1.26.0 @@ -19,6 +19,7 @@ ansi_term = "0.11" console = "0.6" directories = "1.0" lazy_static = "1.0" +libz-sys = "1.0.20" [dependencies.git2] version = "0.7" diff --git a/ci/before_install.bash b/ci/before_install.bash index 709be7d5..9acf6025 100755 --- a/ci/before_install.bash +++ b/ci/before_install.bash @@ -27,3 +27,11 @@ if [[ $TARGET == arm-unknown-linux-gnueabihf ]]; then libc6-armhf-cross \ libc6-dev-armhf-cross fi + +# needed for cross-compiling for arm64 +if [[ $TARGET == aarch64-unknown-linux-gnu ]]; then + sudo apt-get install -y \ + gcc-4.8-aarch64-linux-gnu \ + binutils-aarch64-linux-gnu \ + gcc-aarch64-linux-gnu +fi diff --git a/ci/script.bash b/ci/script.bash index 321dcb14..fc874b96 100755 --- a/ci/script.bash +++ b/ci/script.bash @@ -6,7 +6,7 @@ set -ex cargo build --target "$TARGET" --verbose # We cannot run arm executables on linux -if [[ $TARGET != arm-unknown-linux-gnueabihf ]]; then +if [[ $TARGET != arm-unknown-linux-gnueabihf ]] && [[ $TARGET != aarch64-unknown-linux-gnu ]]; then cargo test --target "$TARGET" --verbose # Run 'bat' on its own source code and the README |