Skip to content

Commit fb2e2ad

Browse files
gnzlbgalexcrichton
authored andcommitted
[ci] powerpc/powerpc64/powerpc64le (rust-lang#237)
* [ci] add powerpc/powerpc64 build bots * unbreak stdsimd builds for targets without run-time
1 parent e465f4d commit fb2e2ad

File tree

6 files changed

+57
-3
lines changed

6 files changed

+57
-3
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ matrix:
1212
- env: TARGET=arm-unknown-linux-gnueabihf
1313
- env: TARGET=armv7-unknown-linux-gnueabihf
1414
- env: TARGET=aarch64-unknown-linux-gnu
15+
- env: TARGET=powerpc-unknown-linux-gnu
16+
- env: TARGET=powerpc64-unknown-linux-gnu
17+
- env: TARGET=powerpc64le-unknown-linux-gnu
1518
- os: osx
1619
env: TARGET=i686-apple-darwin
1720
script: ci/run.sh
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM ubuntu:17.10
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
gcc libc6-dev qemu-user ca-certificates \
5+
gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \
6+
qemu-system-ppc \
7+
make \
8+
file
9+
10+
ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \
11+
CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc -L /usr/powerpc-linux-gnu" \
12+
OBJDUMP=powerpc-linux-gnu-objdump
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ubuntu:17.10
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
gcc \
5+
ca-certificates \
6+
libc6-dev \
7+
gcc-powerpc64-linux-gnu \
8+
libc6-dev-ppc64-cross \
9+
qemu-user \
10+
qemu-system-ppc \
11+
make \
12+
file
13+
14+
ENV CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER=powerpc64-linux-gnu-gcc \
15+
CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc64 -L /usr/powerpc64-linux-gnu" \
16+
CC=powerpc64-linux-gnu-gcc \
17+
OBJDUMP=powerpc64-linux-gnu-objdump
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM ubuntu:17.10
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
gcc libc6-dev qemu-user ca-certificates \
5+
gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross \
6+
qemu-system-ppc file make
7+
8+
ENV CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_LINKER=powerpc64le-linux-gnu-gcc \
9+
CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc64le -L /usr/powerpc64le-linux-gnu" \
10+
CC=powerpc64le-linux-gnu-gcc \
11+
OBJDUMP=powerpc64le-linux-gnu-objdump

ci/dox.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,18 @@ dox() {
2424

2525
cargo build --target $target
2626

27-
rustdoc --target $target -o target/doc/$arch src/lib.rs --crate-name stdsimd --library-path target/$target/debug/deps
27+
rustdoc --target $target \
28+
-o target/doc/$arch src/lib.rs \
29+
--crate-name stdsimd \
30+
--library-path target/$target/debug/deps
2831
}
2932

3033
dox i686 i686-unknown-linux-gnu
3134
dox x86_64 x86_64-unknown-linux-gnu
3235
dox arm armv7-unknown-linux-gnueabihf
3336
dox aarch64 aarch64-unknown-linux-gnu
37+
dox powerpc powerpc-unknown-linux-gnu
38+
dox powerpc64 powerpc64-unknown-linux-gnu
3439

3540
# If we're on travis, not a PR, and on the right branch, publish!
3641
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then

src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ extern crate coresimd;
138138
pub mod vendor {
139139
pub use coresimd::vendor::*;
140140

141-
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
141+
#[cfg(all(target_os = "linux",
142+
any(target_arch = "arm",
143+
target_arch = "aarch64",
144+
target_arch = "powerpc64")))]
142145
pub use super::runtime::{__unstable_detect_feature, __Feature};
143146
}
144147

@@ -147,6 +150,9 @@ pub mod simd {
147150
pub use coresimd::simd::*;
148151
}
149152

150-
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
153+
#[cfg(all(target_os = "linux",
154+
any(target_arch = "arm",
155+
target_arch = "aarch64",
156+
target_arch = "powerpc64")))]
151157
#[macro_use]
152158
mod runtime;

0 commit comments

Comments
 (0)