Skip to content

Commit

Permalink
Support more cross targets
Browse files Browse the repository at this point in the history
Adds support for Android, Linux/ARM, and windows. Bare-metal thumb targets are listed,
because they're supported by cross, but they aren't enabled by default as they don't
support std and will likely not be used by most projects.

I've left off the *linux-musleabi* targets as they are failing with an odd error that
is likely due to musl itself.

Additionally I've left out iOS targets as that support needs to be added to trust before
it should be added here.
  • Loading branch information
Susurrus committed Oct 27, 2017
1 parent 44cd52d commit 0dbe09d
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,28 @@ matrix:
# TODO These are all the build jobs. Adjust as necessary. Comment out what you
# don't need
include:
# Android
- env: TARGET=aarch64-linux-android DISABLE_TESTS=1
- env: TARGET=arm-linux-androideabi DISABLE_TESTS=1
- env: TARGET=armv7-linux-androideabi DISABLE_TESTS=1
- env: TARGET=i686-linux-android DISABLE_TESTS=1
- env: TARGET=x86_64-linux-android DISABLE_TESTS=1

# iOS
- env: TARGET=aarch64-apple-ios DISABLE_TESTS=1
os: osx
- env: TARGET=armv7-apple-ios DISABLE_TESTS=1
os: osx
- env: TARGET=armv7s-apple-ios DISABLE_TESTS=1
os: osx
- env: TARGET=i386-apple-ios DISABLE_TESTS=1
os: osx
- env: TARGET=x86_64-apple-ios DISABLE_TESTS=1
os: osx

# Linux
- env: TARGET=aarch64-unknown-linux-gnu
- env: TARGET=arm-unknown-linux-gnueabi
- env: TARGET=armv7-unknown-linux-gnueabihf
- env: TARGET=i686-unknown-linux-gnu
- env: TARGET=i686-unknown-linux-musl
Expand All @@ -45,6 +65,16 @@ matrix:
- env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1
- env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1

# Windows
- env: TARGET=x86_64-pc-windows-gnu

# Bare metal
# These targets don't support std and as such are likely not suitable for
# most crates.
# - env: TARGET=thumbv6m-none-eabi
# - env: TARGET=thumbv7em-none-eabi
# - env: TARGET=thumbv7em-none-eabihf
# - env: TARGET=thumbv7m-none-eabi

# Testing other channels
- env: TARGET=x86_64-unknown-linux-gnu
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,32 @@ check if using a newer release (see `ci/install.sh`)
would
[fix your problem](https://github.com/japaric/cross/blob/master/CHANGELOG.md).

### Android

- aarch64-linux-android

- arm-linux-androideabi

- armv7-linux-androideabi

- i686-linux-android

- x86_64-linux-android

### iOS

- aarch64-apple-ios

- armv7-apple-ios

- armv7s-apple-ios

- i386-apple-ios

- x86_64-apple-ios

### Linux

- `i686-unknown-linux-gnu`

- `i686-unknown-linux-musl`
Expand All @@ -130,6 +156,8 @@ would

- `aarch64-unknown-linux-gnu`

- `arm-unknown-linux-gnueabi`

- `armv7-unknown-linux-gnueabihf`

- `mips-unknown-linux-gnu`
Expand Down
20 changes: 20 additions & 0 deletions ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ main() {
sort=gsort # for `sort --sort-version`, from brew's coreutils.
fi

# Builds for iOS are done on OSX, but require the specific target to be
# installed.
case $TARGET in
aarch64-apple-ios)
rustup target install aarch64-apple-ios
;;
armv7-apple-ios)
rustup target install armv7-apple-ios
;;
armv7s-apple-ios)
rustup target install armv7s-apple-ios
;;
i386-apple-ios)
rustup target install i386-apple-ios
;;
x86_64-apple-ios)
rustup target install x86_64-apple-ios
;;
esac

# This fetches latest stable release
local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
| cut -d/ -f3 \
Expand Down

0 comments on commit 0dbe09d

Please sign in to comment.