Skip to content

Commit 0e201d8

Browse files
authored
Merge pull request #89 from Susurrus/moar_support
Support more cross targets
2 parents 16e199c + 6df66ab commit 0e201d8

File tree

3 files changed

+88
-11
lines changed

3 files changed

+88
-11
lines changed

.travis.yml

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,39 @@ matrix:
1818
# TODO These are all the build jobs. Adjust as necessary. Comment out what you
1919
# don't need
2020
include:
21+
# Android
22+
- env: TARGET=aarch64-linux-android DISABLE_TESTS=1
23+
- env: TARGET=arm-linux-androideabi DISABLE_TESTS=1
24+
- env: TARGET=armv7-linux-androideabi DISABLE_TESTS=1
25+
- env: TARGET=i686-linux-android DISABLE_TESTS=1
26+
- env: TARGET=x86_64-linux-android DISABLE_TESTS=1
27+
28+
# iOS
29+
- env: TARGET=aarch64-apple-ios DISABLE_TESTS=1
30+
os: osx
31+
- env: TARGET=armv7-apple-ios DISABLE_TESTS=1
32+
os: osx
33+
- env: TARGET=armv7s-apple-ios DISABLE_TESTS=1
34+
os: osx
35+
- env: TARGET=i386-apple-ios DISABLE_TESTS=1
36+
os: osx
37+
- env: TARGET=x86_64-apple-ios DISABLE_TESTS=1
38+
os: osx
39+
2140
# Linux
41+
- env: TARGET=aarch64-unknown-linux-gnu
42+
- env: TARGET=arm-unknown-linux-gnueabi
43+
- env: TARGET=armv7-unknown-linux-gnueabihf
2244
- env: TARGET=i686-unknown-linux-gnu
2345
- env: TARGET=i686-unknown-linux-musl
46+
- env: TARGET=mips-unknown-linux-gnu
47+
- env: TARGET=mips64-unknown-linux-gnuabi64
48+
- env: TARGET=mips64el-unknown-linux-gnuabi64
49+
- env: TARGET=mipsel-unknown-linux-gnu
50+
- env: TARGET=powerpc-unknown-linux-gnu
51+
- env: TARGET=powerpc64-unknown-linux-gnu
52+
- env: TARGET=powerpc64le-unknown-linux-gnu
53+
- env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1
2454
- env: TARGET=x86_64-unknown-linux-gnu
2555
- env: TARGET=x86_64-unknown-linux-musl
2656

@@ -35,17 +65,16 @@ matrix:
3565
- env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1
3666
- env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1
3767

38-
# Other architectures
39-
- env: TARGET=aarch64-unknown-linux-gnu
40-
- env: TARGET=armv7-unknown-linux-gnueabihf
41-
- env: TARGET=mips-unknown-linux-gnu
42-
- env: TARGET=mips64-unknown-linux-gnuabi64
43-
- env: TARGET=mips64el-unknown-linux-gnuabi64
44-
- env: TARGET=mipsel-unknown-linux-gnu
45-
- env: TARGET=powerpc-unknown-linux-gnu
46-
- env: TARGET=powerpc64-unknown-linux-gnu
47-
- env: TARGET=powerpc64le-unknown-linux-gnu
48-
- env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1
68+
# Windows
69+
- env: TARGET=x86_64-pc-windows-gnu
70+
71+
# Bare metal
72+
# These targets don't support std and as such are likely not suitable for
73+
# most crates.
74+
# - env: TARGET=thumbv6m-none-eabi
75+
# - env: TARGET=thumbv7em-none-eabi
76+
# - env: TARGET=thumbv7em-none-eabihf
77+
# - env: TARGET=thumbv7m-none-eabi
4978

5079
# Testing other channels
5180
- env: TARGET=x86_64-unknown-linux-gnu

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,32 @@ check if using a newer release (see `ci/install.sh`)
120120
would
121121
[fix your problem](https://github.com/japaric/cross/blob/master/CHANGELOG.md).
122122

123+
### Android
124+
125+
- aarch64-linux-android
126+
127+
- arm-linux-androideabi
128+
129+
- armv7-linux-androideabi
130+
131+
- i686-linux-android
132+
133+
- x86_64-linux-android
134+
135+
### iOS
136+
137+
- aarch64-apple-ios
138+
139+
- armv7-apple-ios
140+
141+
- armv7s-apple-ios
142+
143+
- i386-apple-ios
144+
145+
- x86_64-apple-ios
146+
147+
### Linux
148+
123149
- `i686-unknown-linux-gnu`
124150

125151
- `i686-unknown-linux-musl`
@@ -130,6 +156,8 @@ would
130156

131157
- `aarch64-unknown-linux-gnu`
132158

159+
- `arm-unknown-linux-gnueabi`
160+
133161
- `armv7-unknown-linux-gnueabihf`
134162

135163
- `mips-unknown-linux-gnu`

ci/install.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@ main() {
1010
sort=gsort # for `sort --sort-version`, from brew's coreutils.
1111
fi
1212

13+
# Builds for iOS are done on OSX, but require the specific target to be
14+
# installed.
15+
case $TARGET in
16+
aarch64-apple-ios)
17+
rustup target install aarch64-apple-ios
18+
;;
19+
armv7-apple-ios)
20+
rustup target install armv7-apple-ios
21+
;;
22+
armv7s-apple-ios)
23+
rustup target install armv7s-apple-ios
24+
;;
25+
i386-apple-ios)
26+
rustup target install i386-apple-ios
27+
;;
28+
x86_64-apple-ios)
29+
rustup target install x86_64-apple-ios
30+
;;
31+
esac
32+
1333
# This fetches latest stable release
1434
local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
1535
| cut -d/ -f3 \

0 commit comments

Comments
 (0)