Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix aarch64-apple-ios build; add build-only/no-test jobs to CI/CD. #1071

Merged
merged 2 commits into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 36 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,25 @@ matrix:
#
# BEGIN GENERATED

- env: TARGET_X=aarch64-apple-ios FEATURES_X= MODE_X=DEBUG KCOV=0 RUST_X=stable
rust: stable
os: osx
osx_image: xcode12

- env: TARGET_X=aarch64-apple-ios FEATURES_X= MODE_X=RELWITHDEBINFO KCOV=0 RUST_X=stable
rust: stable
os: osx
osx_image: xcode12

- env: TARGET_X=x86_64-apple-darwin FEATURES_X= MODE_X=DEBUG KCOV=0 RUST_X=stable
rust: stable
os: osx
osx_image: xcode10.1
osx_image: xcode12

- env: TARGET_X=x86_64-apple-darwin FEATURES_X= MODE_X=RELWITHDEBINFO KCOV=0 RUST_X=stable
rust: stable
os: osx
osx_image: xcode10.1
osx_image: xcode12

- env: TARGET_X=aarch64-linux-android CC_X=aarch64-linux-android21-clang FEATURES_X= MODE_X=DEBUG KCOV=0 RUST_X=stable
rust: stable
Expand Down Expand Up @@ -241,15 +251,25 @@ matrix:
- libc6-dev-armhf-cross
- qemu-user-binfmt

- env: TARGET_X=aarch64-apple-ios FEATURES_X= MODE_X=DEBUG KCOV=0 RUST_X=nightly
rust: nightly
os: osx
osx_image: xcode12

- env: TARGET_X=aarch64-apple-ios FEATURES_X= MODE_X=RELWITHDEBINFO KCOV=0 RUST_X=nightly
rust: nightly
os: osx
osx_image: xcode12

- env: TARGET_X=x86_64-apple-darwin FEATURES_X= MODE_X=DEBUG KCOV=0 RUST_X=nightly
rust: nightly
os: osx
osx_image: xcode10.1
osx_image: xcode12

- env: TARGET_X=x86_64-apple-darwin FEATURES_X= MODE_X=RELWITHDEBINFO KCOV=0 RUST_X=nightly
rust: nightly
os: osx
osx_image: xcode10.1
osx_image: xcode12

- env: TARGET_X=aarch64-linux-android CC_X=aarch64-linux-android21-clang FEATURES_X= MODE_X=DEBUG KCOV=0 RUST_X=nightly
rust: nightly
Expand Down Expand Up @@ -473,15 +493,25 @@ matrix:
- libc6-dev-armhf-cross
- qemu-user-binfmt

- env: TARGET_X=aarch64-apple-ios FEATURES_X= MODE_X=DEBUG KCOV=0 RUST_X=beta
rust: beta
os: osx
osx_image: xcode12

- env: TARGET_X=aarch64-apple-ios FEATURES_X= MODE_X=RELWITHDEBINFO KCOV=0 RUST_X=beta
rust: beta
os: osx
osx_image: xcode12

- env: TARGET_X=x86_64-apple-darwin FEATURES_X= MODE_X=DEBUG KCOV=0 RUST_X=beta
rust: beta
os: osx
osx_image: xcode10.1
osx_image: xcode12

- env: TARGET_X=x86_64-apple-darwin FEATURES_X= MODE_X=RELWITHDEBINFO KCOV=0 RUST_X=beta
rust: beta
os: osx
osx_image: xcode10.1
osx_image: xcode12

- env: TARGET_X=aarch64-linux-android CC_X=aarch64-linux-android21-clang FEATURES_X= MODE_X=DEBUG KCOV=0 RUST_X=beta
rust: beta
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ the table below. The C compilers listed are used for compiling the C portions.
</tr>
<tr><td>Mac&nbsp;OS&nbsp;X</td>
<td>x64</td>
<td>Apple LLVM version 9.0.0 (clang-900.0.39.2) from Xcode 9.3</td>
<td>Xcode 12 with its associated version of Apple Clang</td>
</tr>
<tr><td>Windows</td>
<td>x86, x86_64</td>
Expand Down
3 changes: 3 additions & 0 deletions mk/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ source $HOME/.cargo/env
run_tests_on_host=1

case $TARGET_X in
aarch64-apple-ios)
run_tests_on_host=
;;
aarch64-unknown-linux-gnu)
export QEMU_LD_PREFIX=/usr/aarch64-linux-gnu
;;
Expand Down
11 changes: 8 additions & 3 deletions mk/update-travis-yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@
gcc,
]

osx_compilers = [
apple_compilers = [
"", # Don't set CC.'
]

compilers = {
"aarch64-apple-ios" : apple_compilers,
"aarch64-unknown-linux-gnu" : [ "aarch64-linux-gnu-gcc" ],
"aarch64-linux-android" : [ "aarch64-linux-android21-clang" ],
"armv7-linux-androideabi" : [ "armv7a-linux-androideabi18-clang" ],
Expand All @@ -50,7 +51,7 @@
"i686-unknown-linux-musl" : [clang],
"x86_64-unknown-linux-gnu" : linux_compilers,
"x86_64-unknown-linux-musl" : [clang],
"x86_64-apple-darwin" : osx_compilers,
"x86_64-apple-darwin" : apple_compilers,
}

feature_sets = [
Expand All @@ -71,6 +72,7 @@

targets = {
"osx" : [
"aarch64-apple-ios",
"x86_64-apple-darwin",
],
"linux" : [
Expand Down Expand Up @@ -136,6 +138,9 @@ def format_entry(os, target, compiler, rust, mode, features):
if sys == "darwin":
abi = sys
sys = "macos"
elif sys == "ios":
abi = sys
sys = "ios"
elif sys == "androideabi":
linux_dist = android_linux_dist
abi = sys
Expand Down Expand Up @@ -177,7 +182,7 @@ def prefix_all(prefix, xs):
cc = compiler

if os == "osx":
os += "\n" + entry_indent + "osx_image: xcode10.1"
os += "\n" + entry_indent + "osx_image: xcode12"

compilers = []
if cc != "":
Expand Down
5 changes: 4 additions & 1 deletion src/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ pub(crate) mod arm {
}

// Keep in sync with `ARMV7_NEON`.
#[cfg(any(target_arch = "aarch64", target_arch = "arm"))]
#[cfg(all(
any(target_arch = "aarch64", target_arch = "arm"),
not(target_os = "ios")
))]
pub(crate) const NEON: Feature = Feature {
mask: 1 << 0,
ios: true,
Expand Down