Fix OSX builders on CI

Looks like Travis has moved on from our old images, so we're forced to
update.
This commit is contained in:
Alex Crichton 2018-07-31 14:13:30 -07:00
parent e1ebfafc2f
commit 83f78df8c6
5 changed files with 66 additions and 27 deletions

View File

@ -41,10 +41,10 @@ matrix:
- env: TARGET=i686-unknown-linux-gnu
- os: osx
env: TARGET=x86_64-apple-darwin NO_ADD=1
osx_image: xcode8.3
osx_image: xcode9.4
- os: osx
env: TARGET=i686-apple-darwin
osx_image: xcode8.3
osx_image: xcode9.4
- env: TARGET=arm-linux-androideabi
- env: TARGET=aarch64-linux-android
# FIXME(#826) should reenable
@ -59,14 +59,14 @@ matrix:
# FIXME(#856)
rust: 1.22.1
- os: osx
osx_image: xcode8.2
osx_image: xcode9.4
env: TARGET=i386-apple-ios
CARGO_TARGET_I386_APPLE_IOS_RUNNER=$HOME/runtest
RUSTFLAGS=-Clink-arg=-mios-simulator-version-min=7.0
before_install:
rustc ./ci/ios/deploy_and_run_on_ios_simulator.rs -o $HOME/runtest
- os: osx
osx_image: xcode8.2
osx_image: xcode9.4
env: TARGET=x86_64-apple-ios
CARGO_TARGET_X86_64_APPLE_IOS_RUNNER=$HOME/runtest
RUSTFLAGS=-Clink-arg=-mios-simulator-version-min=7.0
@ -91,7 +91,7 @@ matrix:
rust: beta
- os: osx
env: TARGET=x86_64-apple-darwin NO_ADD=1
osx_image: xcode8.3
osx_image: xcode9.4
rust: beta
# nightly
@ -99,7 +99,7 @@ matrix:
rust: nightly
- os: osx
env: TARGET=x86_64-apple-darwin NO_ADD=1
osx_image: xcode8.3
osx_image: xcode9.4
rust: nightly
# not available on stable
# without --release the build fails

View File

@ -123,6 +123,7 @@ fn run_app_on_simulator() {
.arg("com.rust.unittests")
.output());
println!("status: {}", output.status);
println!("stdout --\n{}\n", String::from_utf8_lossy(&output.stdout));
println!("stderr --\n{}\n", String::from_utf8_lossy(&output.stderr));

View File

@ -15,6 +15,7 @@ fn main() {
let linux = target.contains("unknown-linux");
let android = target.contains("android");
let apple = target.contains("apple");
let ios = target.contains("apple-ios");
let emscripten = target.contains("asm");
let musl = target.contains("musl") || emscripten;
let uclibc = target.contains("uclibc");
@ -84,8 +85,10 @@ fn main() {
cfg.header("sys/socket.h");
}
cfg.header("net/if.h");
cfg.header("net/route.h");
cfg.header("net/if_arp.h");
if !ios {
cfg.header("net/route.h");
cfg.header("net/if_arp.h");
}
cfg.header("netdb.h");
cfg.header("netinet/in.h");
cfg.header("netinet/ip.h");
@ -113,7 +116,7 @@ fn main() {
cfg.header("pwd.h");
cfg.header("grp.h");
cfg.header("sys/utsname.h");
if !solaris {
if !solaris && !ios {
cfg.header("sys/ptrace.h");
}
cfg.header("sys/mount.h");
@ -175,19 +178,22 @@ fn main() {
cfg.header("util.h");
cfg.header("xlocale.h");
cfg.header("sys/xattr.h");
cfg.header("sys/sys_domain.h");
cfg.header("net/if_utun.h");
cfg.header("net/bpf.h");
if target.starts_with("x86") {
if target.starts_with("x86") && !ios {
cfg.header("crt_externs.h");
}
cfg.header("net/route.h");
cfg.header("netinet/if_ether.h");
cfg.header("netinet/in.h");
cfg.header("sys/proc_info.h");
cfg.header("sys/kern_control.h");
cfg.header("sys/ipc.h");
cfg.header("sys/shm.h");
if !ios {
cfg.header("sys/sys_domain.h");
cfg.header("net/if_utun.h");
cfg.header("net/bpf.h");
cfg.header("net/route.h");
cfg.header("netinet/if_ether.h");
cfg.header("sys/proc_info.h");
cfg.header("sys/kern_control.h");
}
}
if bsdlike {
@ -449,6 +455,17 @@ fn main() {
// header conflicts when including them with all the other structs.
"termios2" => true,
// Present on historical versions of iOS but missing in more recent
// SDKs
"bpf_hdr" |
"proc_taskinfo" |
"proc_taskallinfo" |
"proc_bsdinfo" |
"proc_threadinfo" |
"sockaddr_inarp" |
"sockaddr_ctl" |
"arphdr" if ios => true,
_ => false
}
});
@ -594,6 +611,30 @@ fn main() {
// shouldn't be used in code anyway...
"AF_MAX" | "PF_MAX" => true,
// Present on historical versions of iOS, but now removed in more
// recent SDKs
"ARPOP_REQUEST" |
"ARPOP_REPLY" |
"ATF_COM" |
"ATF_PERM" |
"ATF_PUBL" |
"ATF_USETRAILERS" |
"AF_SYS_CONTROL" |
"SYSPROTO_EVENT" |
"PROC_PIDTASKALLINFO" |
"PROC_PIDTASKINFO" |
"PROC_PIDTHREADINFO" |
"UTUN_OPT_FLAGS" |
"UTUN_OPT_IFNAME" |
"BPF_ALIGNMENT" |
"SYSPROTO_CONTROL" if ios => true,
s if ios && s.starts_with("RTF_") => true,
s if ios && s.starts_with("RTM_") => true,
s if ios && s.starts_with("RTA_") => true,
s if ios && s.starts_with("RTAX_") => true,
s if ios && s.starts_with("RTV_") => true,
s if ios && s.starts_with("DLT_") => true,
_ => false,
}
});
@ -736,6 +777,10 @@ fn main() {
// FIXME: mincore is defined with caddr_t on Solaris.
"mincore" if solaris => true,
// These were all included in historical versions of iOS but appear
// to be removed now
"system" | "ptrace" if ios => true,
_ => false,
}
});

View File

@ -765,16 +765,8 @@ pub const VM_FLAGS_SUPERPAGE_MASK: ::c_int = 0x70000;
pub const VM_FLAGS_RETURN_DATA_ADDR: ::c_int = 0x100000;
pub const VM_FLAGS_RETURN_4K_DATA_ADDR: ::c_int = 0x800000;
pub const VM_FLAGS_ALIAS_MASK: ::c_int = 0xFF000000;
pub const VM_FLAGS_USER_ALLOCATE: ::c_int = VM_FLAGS_FIXED | VM_FLAGS_ANYWHERE |
VM_FLAGS_PURGABLE |
VM_FLAGS_RANDOM_ADDR |
VM_FLAGS_NO_CACHE |
VM_FLAGS_OVERWRITE |
VM_FLAGS_SUPERPAGE_MASK |
VM_FLAGS_ALIAS_MASK;
pub const VM_FLAGS_USER_MAP: ::c_int = VM_FLAGS_USER_ALLOCATE |
VM_FLAGS_RETURN_4K_DATA_ADDR |
VM_FLAGS_RETURN_DATA_ADDR;
pub const VM_FLAGS_USER_ALLOCATE: ::c_int = 0xff07401b;
pub const VM_FLAGS_USER_MAP: ::c_int = 0xff97401b;
pub const VM_FLAGS_USER_REMAP: ::c_int = VM_FLAGS_FIXED | VM_FLAGS_ANYWHERE |
VM_FLAGS_RANDOM_ADDR |
VM_FLAGS_OVERWRITE |

View File

@ -931,6 +931,7 @@ extern {
pub fn openlog(ident: *const ::c_char, logopt: ::c_int, facility: ::c_int);
pub fn closelog();
pub fn setlogmask(maskpri: ::c_int) -> ::c_int;
#[cfg_attr(target_os = "macos", link_name = "syslog$DARWIN_EXTSN")]
pub fn syslog(priority: ::c_int, message: *const ::c_char, ...);
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
link_name = "nice$UNIX2003")]