From 88d159dbe8cf3026c5037f8f2c62cc14c9701c74 Mon Sep 17 00:00:00 2001 From: Alex Crichton <alex@alexcrichton.com> Date: Fri, 20 Jul 2018 09:51:59 -0700 Subject: [PATCH] Fix compile of stdsimd on powerpc with no flags We're running into issues updating with rust-lang/rust#52535, so we need to get this working without `RUSTFLAGS` enabling the `altivec` feature --- ci/run.sh | 2 -- coresimd/powerpc/mod.rs | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/run.sh b/ci/run.sh index ae4522987d..d2350fc6c7 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -14,7 +14,6 @@ RUSTFLAGS="$RUSTFLAGS --cfg stdsimd_strict" # FIXME: on armv7 neon intrinsics require the neon target-feature to be # unconditionally enabled. -# FIXME: powerpc (32-bit) must be compiled with altivec # FIXME: on powerpc (32-bit) and powerpc64 (big endian) disable # the instr tests. case ${TARGET} in @@ -22,7 +21,6 @@ case ${TARGET} in export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+neon" ;; powerpc-*) - export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+altivec" export STDSIMD_DISABLE_ASSERT_INSTR=1 ;; powerpc64-*) diff --git a/coresimd/powerpc/mod.rs b/coresimd/powerpc/mod.rs index e07279df03..6e16e4ce59 100644 --- a/coresimd/powerpc/mod.rs +++ b/coresimd/powerpc/mod.rs @@ -1,6 +1,8 @@ //! PowerPC intrinsics +#[cfg(target_feature = "altivec")] mod altivec; +#[cfg(target_feature = "altivec")] pub use self::altivec::*; mod vsx;