Rollup merge of #125226 - madsmtm:fix-mac-catalyst-tests, r=workingjubilee

Make more of the test suite run on Mac Catalyst

Combined with https://github.com/rust-lang/rust/pull/125225, the only failing parts of the test suite are in `tests/rustdoc-js`, `tests/rustdoc-js-std` and `tests/debuginfo`. Tested with:
```console
./x test --target=aarch64-apple-ios-macabi library/std
./x test --target=aarch64-apple-ios-macabi --skip=tests/rustdoc-js --skip=tests/rustdoc-js-std --skip=tests/debuginfo tests
```

Will probably put up a PR later to enable _running_ on (not just compiling for) Mac Catalyst in CI, though not sure where exactly I should do so? `src/ci/github-actions/jobs.yml`?

Note that I've deliberately _not_ enabled stack overflow handlers on iOS/tvOS/watchOS/visionOS (see https://github.com/rust-lang/rust/issues/25872), but rather just skipped those tests, as it uses quite a few APIs that I'd be weary about getting rejected by the App Store (note that Swift doesn't do it on those platforms either).

r? ``@workingjubilee``

CC ``@thomcc``

``@rustbot`` label O-ios O-apple
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-05-29 03:25:08 +01:00 committed by GitHub
commit 3cc59aeaae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
48 changed files with 120 additions and 100 deletions

View File

@ -1431,7 +1431,7 @@ fn metadata_access_times() {
assert_eq!(check!(a.modified()), check!(a.modified())); assert_eq!(check!(a.modified()), check!(a.modified()));
assert_eq!(check!(b.accessed()), check!(b.modified())); assert_eq!(check!(b.accessed()), check!(b.modified()));
if cfg!(target_os = "macos") || cfg!(target_os = "windows") { if cfg!(target_vendor = "apple") || cfg!(target_os = "windows") {
check!(a.created()); check!(a.created());
check!(b.created()); check!(b.created());
} }

View File

@ -491,6 +491,14 @@ mod imp {
} }
} }
// This is intentionally not enabled on iOS/tvOS/watchOS/visionOS, as it uses
// several symbols that might lead to rejections from the App Store, namely
// `sigaction`, `sigaltstack`, `sysctlbyname`, `mmap`, `munmap` and `mprotect`.
//
// This might be overly cautious, though it is also what Swift does (and they
// usually have fewer qualms about forwards compatibility, since the runtime
// is shipped with the OS):
// <https://github.com/apple/swift/blob/swift-5.10-RELEASE/stdlib/public/runtime/CrashHandlerMacOS.cpp>
#[cfg(not(any( #[cfg(not(any(
target_os = "linux", target_os = "linux",
target_os = "freebsd", target_os = "freebsd",

View File

@ -5,7 +5,7 @@
pub fn dylib_path_var() -> &'static str { pub fn dylib_path_var() -> &'static str {
if cfg!(target_os = "windows") { if cfg!(target_os = "windows") {
"PATH" "PATH"
} else if cfg!(target_os = "macos") { } else if cfg!(target_vendor = "apple") {
"DYLD_LIBRARY_PATH" "DYLD_LIBRARY_PATH"
} else if cfg!(target_os = "haiku") { } else if cfg!(target_os = "haiku") {
"LIBRARY_PATH" "LIBRARY_PATH"

View File

@ -747,6 +747,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"ignore-aarch64", "ignore-aarch64",
"ignore-aarch64-unknown-linux-gnu", "ignore-aarch64-unknown-linux-gnu",
"ignore-android", "ignore-android",
"ignore-apple",
"ignore-arm", "ignore-arm",
"ignore-avr", "ignore-avr",
"ignore-beta", "ignore-beta",
@ -829,7 +830,6 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"ignore-x32", "ignore-x32",
"ignore-x86", "ignore-x86",
"ignore-x86_64", "ignore-x86_64",
"ignore-x86_64-apple-darwin",
"ignore-x86_64-unknown-linux-gnu", "ignore-x86_64-unknown-linux-gnu",
"incremental", "incremental",
"known-bug", "known-bug",
@ -876,6 +876,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"only-32bit", "only-32bit",
"only-64bit", "only-64bit",
"only-aarch64", "only-aarch64",
"only-apple",
"only-arm", "only-arm",
"only-avr", "only-avr",
"only-beta", "only-beta",

View File

@ -159,6 +159,12 @@ pub(super) fn parse_cfg_name_directive<'a>(
message: "when the architecture is part of the Thumb family" message: "when the architecture is part of the Thumb family"
} }
condition! {
name: "apple",
condition: config.target.contains("apple"),
message: "when the target vendor is Apple"
}
// Technically the locally built compiler uses the "dev" channel rather than the "nightly" // Technically the locally built compiler uses the "dev" channel rather than the "nightly"
// channel, even though most people don't know or won't care about it. To avoid confusion, we // channel, even though most people don't know or won't care about it. To avoid confusion, we
// treat the "dev" channel as the "nightly" channel when processing the directive. // treat the "dev" channel as the "nightly" channel when processing the directive.

View File

@ -98,7 +98,7 @@ fn get_lib_name(lib: &str, aux_type: AuxType) -> Option<String> {
AuxType::Lib => Some(format!("lib{}.rlib", lib)), AuxType::Lib => Some(format!("lib{}.rlib", lib)),
AuxType::Dylib => Some(if cfg!(windows) { AuxType::Dylib => Some(if cfg!(windows) {
format!("{}.dll", lib) format!("{}.dll", lib)
} else if cfg!(target_os = "macos") { } else if cfg!(target_vendor = "apple") {
format!("lib{}.dylib", lib) format!("lib{}.dylib", lib)
} else { } else {
format!("lib{}.so", lib) format!("lib{}.so", lib)

View File

@ -57,7 +57,7 @@ impl PathBufExt for PathBuf {
pub fn dylib_env_var() -> &'static str { pub fn dylib_env_var() -> &'static str {
if cfg!(windows) { if cfg!(windows) {
"PATH" "PATH"
} else if cfg!(target_os = "macos") { } else if cfg!(target_vendor = "apple") {
"DYLD_LIBRARY_PATH" "DYLD_LIBRARY_PATH"
} else if cfg!(target_os = "haiku") { } else if cfg!(target_os = "haiku") {
"LIBRARY_PATH" "LIBRARY_PATH"

View File

@ -2122,7 +2122,6 @@ ui/issues/issue-33687.rs
ui/issues/issue-33770.rs ui/issues/issue-33770.rs
ui/issues/issue-3389.rs ui/issues/issue-3389.rs
ui/issues/issue-33941.rs ui/issues/issue-33941.rs
ui/issues/issue-33992.rs
ui/issues/issue-34047.rs ui/issues/issue-34047.rs
ui/issues/issue-34074.rs ui/issues/issue-34074.rs
ui/issues/issue-34209.rs ui/issues/issue-34209.rs

View File

@ -15,7 +15,7 @@ use std::path::{Path, PathBuf};
const ENTRY_LIMIT: u32 = 900; const ENTRY_LIMIT: u32 = 900;
// FIXME: The following limits should be reduced eventually. // FIXME: The following limits should be reduced eventually.
const ISSUES_ENTRY_LIMIT: u32 = 1676; const ISSUES_ENTRY_LIMIT: u32 = 1674;
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[ const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
"rs", // test source files "rs", // test source files

View File

@ -1,6 +1,6 @@
//@ revisions: all strong basic none missing //@ revisions: all strong basic none missing
//@ assembly-output: emit-asm //@ assembly-output: emit-asm
//@ ignore-macos slightly different policy on stack protection of arrays //@ ignore-apple slightly different policy on stack protection of arrays
//@ ignore-msvc stack check code uses different function names //@ ignore-msvc stack check code uses different function names
//@ ignore-nvptx64 stack protector is not supported //@ ignore-nvptx64 stack protector is not supported
//@ ignore-wasm32-bare //@ ignore-wasm32-bare
@ -17,12 +17,9 @@
// See comments on https://github.com/rust-lang/rust/issues/114903. // See comments on https://github.com/rust-lang/rust/issues/114903.
#![crate_type = "lib"] #![crate_type = "lib"]
#![allow(incomplete_features)] #![allow(incomplete_features)]
#![feature(unsized_locals, unsized_fn_params)] #![feature(unsized_locals, unsized_fn_params)]
// CHECK-LABEL: emptyfn: // CHECK-LABEL: emptyfn:
#[no_mangle] #[no_mangle]
pub fn emptyfn() { pub fn emptyfn() {

View File

@ -2,7 +2,7 @@
//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel //@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel
//@ only-x86_64 //@ only-x86_64
//@ ignore-sgx //@ ignore-sgx
//@ ignore-macos (manipulates rsp too) //@ ignore-apple (manipulates rsp too)
// Depending on various codegen choices, this might end up copying // Depending on various codegen choices, this might end up copying
// a `<2 x i8>`, an `i16`, or two `i8`s. // a `<2 x i8>`, an `i16`, or two `i8`s.

View File

@ -9,7 +9,7 @@
//@ [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern //@ [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern
//@ [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep //@ [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep
//@ only-x86_64 //@ only-x86_64
//@ ignore-x86_64-apple-darwin Symbol is called `___x86_return_thunk` (Darwin's extra underscore) //@ ignore-apple Symbol is called `___x86_return_thunk` (Darwin's extra underscore)
//@ ignore-sgx Tests incompatible with LVI mitigations //@ ignore-sgx Tests incompatible with LVI mitigations
#![crate_type = "lib"] #![crate_type = "lib"]

View File

@ -1,6 +1,6 @@
// //
//@ ignore-windows //@ ignore-windows
//@ ignore-macos //@ ignore-apple
//@ ignore-wasm //@ ignore-wasm
//@ ignore-emscripten //@ ignore-emscripten

View File

@ -11,7 +11,7 @@
//@ [LINUX] filecheck-flags: -DINSTR_PROF_COVFUN=__llvm_covfun //@ [LINUX] filecheck-flags: -DINSTR_PROF_COVFUN=__llvm_covfun
//@ [LINUX] filecheck-flags: '-DCOMDAT_IF_SUPPORTED=, comdat' //@ [LINUX] filecheck-flags: '-DCOMDAT_IF_SUPPORTED=, comdat'
//@ [DARWIN] only-macos //@ [DARWIN] only-apple
//@ [DARWIN] filecheck-flags: -DINSTR_PROF_DATA=__DATA,__llvm_prf_data,regular,live_support //@ [DARWIN] filecheck-flags: -DINSTR_PROF_DATA=__DATA,__llvm_prf_data,regular,live_support
//@ [DARWIN] filecheck-flags: -DINSTR_PROF_NAME=__DATA,__llvm_prf_names //@ [DARWIN] filecheck-flags: -DINSTR_PROF_NAME=__DATA,__llvm_prf_names
//@ [DARWIN] filecheck-flags: -DINSTR_PROF_CNTS=__DATA,__llvm_prf_cnts //@ [DARWIN] filecheck-flags: -DINSTR_PROF_CNTS=__DATA,__llvm_prf_cnts
@ -49,7 +49,7 @@ where
pub fn wrap_with<F, T>(inner: T, should_wrap: bool, wrapper: F) pub fn wrap_with<F, T>(inner: T, should_wrap: bool, wrapper: F)
where where
F: FnOnce(&T) F: FnOnce(&T),
{ {
if should_wrap { if should_wrap {
wrapper(&inner) wrapper(&inner)

View File

@ -1,5 +1,5 @@
// //
//@ only-macos //@ only-apple
//@ compile-flags: -O //@ compile-flags: -O
#![crate_type = "rlib"] #![crate_type = "rlib"]

View File

@ -2,7 +2,7 @@
// before 4.0, formerly backported to the Rust LLVM fork. // before 4.0, formerly backported to the Rust LLVM fork.
//@ ignore-windows //@ ignore-windows
//@ ignore-macos //@ ignore-apple
//@ ignore-wasi //@ ignore-wasi
//@ compile-flags: -g -C no-prepopulate-passes //@ compile-flags: -g -C no-prepopulate-passes
@ -10,5 +10,4 @@
// CHECK-LABEL: @main // CHECK-LABEL: @main
// CHECK: {{.*}}DISubprogram{{.*}}name: "main",{{.*}}DI{{(SP)?}}FlagMainSubprogram{{.*}} // CHECK: {{.*}}DISubprogram{{.*}}name: "main",{{.*}}DI{{(SP)?}}FlagMainSubprogram{{.*}}
pub fn main() { pub fn main() {}
}

View File

@ -1,5 +1,5 @@
//@ ignore-windows //@ ignore-windows
//@ ignore-macos //@ ignore-apple
//@ ignore-wasi wasi codegens the main symbol differently //@ ignore-wasi wasi codegens the main symbol differently
//@ compile-flags: -g -C no-prepopulate-passes //@ compile-flags: -g -C no-prepopulate-passes

View File

@ -1,6 +1,6 @@
// Test that __llvm_profile_counter_bias does not get internalized by lto. // Test that __llvm_profile_counter_bias does not get internalized by lto.
//@ ignore-macos -runtime-counter-relocation not honored on Mach-O //@ ignore-apple -runtime-counter-relocation not honored on Mach-O
//@ compile-flags: -Cprofile-generate -Cllvm-args=-runtime-counter-relocation -Clto=fat //@ compile-flags: -Cprofile-generate -Cllvm-args=-runtime-counter-relocation -Clto=fat
//@ needs-profiler-support //@ needs-profiler-support
//@ no-prefer-dynamic //@ no-prefer-dynamic

View File

@ -4,7 +4,7 @@
# ignore-cross-compile # ignore-cross-compile
include ../tools.mk include ../tools.mk
# ignore-macos # ignore-apple
# #
# This hits an assertion in the linker on older versions of osx apparently # This hits an assertion in the linker on older versions of osx apparently

View File

@ -4,7 +4,7 @@
# ignore-cross-compile # ignore-cross-compile
include ../tools.mk include ../tools.mk
# ignore-macos # ignore-apple
# #
# This hits an assertion in the linker on older versions of osx apparently # This hits an assertion in the linker on older versions of osx apparently

View File

@ -1,10 +1,10 @@
include ../tools.mk include ../tools.mk
# ignore-windows # ignore-windows
# ignore-macos # ignore-apple
# #
# This feature only works when the output object format is ELF so we ignore # This feature only works when the output object format is ELF so we ignore
# macOS and Windows # Apple and Windows
# check that the .stack_sizes section is generated # check that the .stack_sizes section is generated
all: all:

View File

@ -2,7 +2,7 @@
include ../tools.mk include ../tools.mk
# ignore-windows # ignore-windows
# ignore-macos # ignore-apple
# Test for #39529. # Test for #39529.
# `-z text` causes ld to error if there are any non-PIC sections # `-z text` causes ld to error if there are any non-PIC sections

View File

@ -1,4 +1,4 @@
# only-macos # only-apple
# #
# Check that linking to a framework actually makes it to the linker. # Check that linking to a framework actually makes it to the linker.

View File

@ -1,4 +1,4 @@
# only-macos # only-apple
include ../tools.mk include ../tools.mk

View File

@ -1,5 +1,5 @@
# ignore-cross-compile # ignore-cross-compile
# ignore-macos # ignore-apple
include ../tools.mk include ../tools.mk

View File

@ -1,9 +1,9 @@
include ../tools.mk include ../tools.mk
# only-macos # only-apple
# #
# This checks that `#[used]` passes through to the linker on # This checks that `#[used]` passes through to the linker on
# darwin. This is subject to change in the future, see # Apple targets. This is subject to change in the future, see
# https://github.com/rust-lang/rust/pull/93718 for discussion # https://github.com/rust-lang/rust/pull/93718 for discussion
all: all:

View File

@ -1,6 +1,6 @@
//@ ignore-wasm32 no subprocess support //@ ignore-wasm32 no subprocess support
//@ ignore-sgx no processes //@ ignore-sgx no processes
//@ ignore-macos this needs valgrind 3.11 or higher; see //@ ignore-apple this needs valgrind 3.11 or higher; see
// https://github.com/rust-lang/rust/pull/30365#issuecomment-165763679 // https://github.com/rust-lang/rust/pull/30365#issuecomment-165763679
use std::env; use std::env;
@ -11,8 +11,7 @@ fn main() {
print!("hello!"); print!("hello!");
exit(0); exit(0);
} else { } else {
let out = Command::new(env::args().next().unwrap()).arg("foo") let out = Command::new(env::args().next().unwrap()).arg("foo").output().unwrap();
.output().unwrap();
assert!(out.status.success()); assert!(out.status.success());
assert_eq!(String::from_utf8(out.stdout).unwrap(), "hello!"); assert_eq!(String::from_utf8(out.stdout).unwrap(), "hello!");
assert_eq!(String::from_utf8(out.stderr).unwrap(), ""); assert_eq!(String::from_utf8(out.stderr).unwrap(), "");

View File

@ -10,5 +10,9 @@
//@ compile-flags: -C lto //@ compile-flags: -C lto
//@ no-prefer-dynamic //@ no-prefer-dynamic
//@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino //@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino
//@ ignore-ios Stack probes are enabled, but the SIGSEGV handler isn't
//@ ignore-tvos Stack probes are enabled, but the SIGSEGV handler isn't
//@ ignore-watchos Stack probes are enabled, but the SIGSEGV handler isn't
//@ ignore-visionos Stack probes are enabled, but the SIGSEGV handler isn't
include!("stack-probes.rs"); include!("stack-probes.rs");

View File

@ -8,6 +8,10 @@
//@ ignore-sgx no processes //@ ignore-sgx no processes
//@ ignore-fuchsia no exception handler registered for segfault //@ ignore-fuchsia no exception handler registered for segfault
//@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino //@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino
//@ ignore-ios Stack probes are enabled, but the SIGSEGV handler isn't
//@ ignore-tvos Stack probes are enabled, but the SIGSEGV handler isn't
//@ ignore-watchos Stack probes are enabled, but the SIGSEGV handler isn't
//@ ignore-visionos Stack probes are enabled, but the SIGSEGV handler isn't
use std::env; use std::env;
use std::mem::MaybeUninit; use std::mem::MaybeUninit;

View File

@ -2,7 +2,7 @@
//@ compile-flags:-Cstrip=none //@ compile-flags:-Cstrip=none
//@ compile-flags:-g -Csplit-debuginfo=unpacked //@ compile-flags:-g -Csplit-debuginfo=unpacked
//@ only-macos //@ only-apple
use std::process::Command; use std::process::Command;
use std::str; use std::str;

View File

@ -1,4 +1,4 @@
//@ only-macos //@ only-apple
//@ compile-flags: --print deployment-target //@ compile-flags: --print deployment-target
//@ normalize-stdout-test: "\d+\." -> "$$CURRENT_MAJOR_VERSION." //@ normalize-stdout-test: "\d+\." -> "$$CURRENT_MAJOR_VERSION."
//@ normalize-stdout-test: "\d+" -> "$$CURRENT_MINOR_VERSION" //@ normalize-stdout-test: "\d+" -> "$$CURRENT_MINOR_VERSION"

View File

@ -10,7 +10,8 @@ mod rusti {
} }
} }
#[cfg(any(target_os = "android", #[cfg(any(
target_os = "android",
target_os = "dragonfly", target_os = "dragonfly",
target_os = "emscripten", target_os = "emscripten",
target_os = "freebsd", target_os = "freebsd",
@ -18,12 +19,12 @@ mod rusti {
target_os = "hurd", target_os = "hurd",
target_os = "illumos", target_os = "illumos",
target_os = "linux", target_os = "linux",
target_os = "macos",
target_os = "netbsd", target_os = "netbsd",
target_os = "openbsd", target_os = "openbsd",
target_os = "solaris", target_os = "solaris",
target_os = "vxworks", target_os = "vxworks",
target_os = "nto", target_os = "nto",
target_vendor = "apple",
))] ))]
mod m { mod m {
#[cfg(target_arch = "x86")] #[cfg(target_arch = "x86")]

View File

@ -2,10 +2,10 @@
#![allow(unused_variables)] #![allow(unused_variables)]
//@ compile-flags:--test -g //@ compile-flags:--test -g
#[cfg(target_os = "macos")] #[cfg(target_vendor = "apple")]
#[test] #[test]
fn simple_test() { fn simple_test() {
use std::{env, panic, fs}; use std::{env, fs, panic};
// Find our dSYM and replace the DWARF binary with an empty file // Find our dSYM and replace the DWARF binary with an empty file
let mut dsym_path = env::current_exe().unwrap(); let mut dsym_path = env::current_exe().unwrap();
@ -13,8 +13,13 @@ fn simple_test() {
assert!(dsym_path.pop()); // Pop executable assert!(dsym_path.pop()); // Pop executable
dsym_path.push(format!("{}.dSYM/Contents/Resources/DWARF/{0}", executable_name)); dsym_path.push(format!("{}.dSYM/Contents/Resources/DWARF/{0}", executable_name));
{ {
let file = fs::OpenOptions::new().read(false).write(true).truncate(true).create(false) let file = fs::OpenOptions::new()
.open(&dsym_path).unwrap(); .read(false)
.write(true)
.truncate(true)
.create(false)
.open(&dsym_path)
.unwrap();
} }
env::set_var("RUST_BACKTRACE", "1"); env::set_var("RUST_BACKTRACE", "1");

View File

@ -1,32 +1,32 @@
//@ run-pass //@ run-pass
#![allow(non_upper_case_globals)] #![allow(non_upper_case_globals)]
#[cfg(not(target_os = "macos"))] #[cfg(not(target_vendor = "apple"))]
#[link_section=".moretext"] #[link_section = ".moretext"]
fn i_live_in_more_text() -> &'static str { fn i_live_in_more_text() -> &'static str {
"knock knock" "knock knock"
} }
#[cfg(not(target_os = "macos"))] #[cfg(not(target_vendor = "apple"))]
#[link_section=".imm"] #[link_section = ".imm"]
static magic: usize = 42; static magic: usize = 42;
#[cfg(not(target_os = "macos"))] #[cfg(not(target_vendor = "apple"))]
#[link_section=".mut"] #[link_section = ".mut"]
static mut frobulator: usize = 0xdeadbeef; static mut frobulator: usize = 0xdeadbeef;
#[cfg(target_os = "macos")] #[cfg(target_vendor = "apple")]
#[link_section="__TEXT,__moretext"] #[link_section = "__TEXT,__moretext"]
fn i_live_in_more_text() -> &'static str { fn i_live_in_more_text() -> &'static str {
"knock knock" "knock knock"
} }
#[cfg(target_os = "macos")] #[cfg(target_vendor = "apple")]
#[link_section="__RODATA,__imm"] #[link_section = "__RODATA,__imm"]
static magic: usize = 42; static magic: usize = 42;
#[cfg(target_os = "macos")] #[cfg(target_vendor = "apple")]
#[link_section="__DATA,__mut"] #[link_section = "__DATA,__mut"]
static mut frobulator: usize = 0xdeadbeef; static mut frobulator: usize = 0xdeadbeef;
pub fn main() { pub fn main() {

View File

@ -1,5 +1,5 @@
// Check that linking frameworks on Apple platforms works. // Check that linking frameworks on Apple platforms works.
//@ only-macos //@ only-apple
//@ revisions: omit link weak both //@ revisions: omit link weak both
//@ [omit]build-fail //@ [omit]build-fail
//@ [link]run-pass //@ [link]run-pass

View File

@ -1,4 +1,4 @@
//@ ignore-macos this is supposed to succeed on osx //@ ignore-apple this is supposed to succeed on Apple platforms (though it won't necessarily link)
#[link(name = "foo", kind = "framework")] #[link(name = "foo", kind = "framework")]
extern "C" {} extern "C" {}

View File

@ -1,5 +1,5 @@
error[E0455]: link kind `framework` is only supported on Apple targets error[E0455]: link kind `framework` is only supported on Apple targets
--> $DIR/osx-frameworks.rs:3:29 --> $DIR/kind-framework.rs:3:29
| |
LL | #[link(name = "foo", kind = "framework")] LL | #[link(name = "foo", kind = "framework")]
| ^^^^^^^^^^^ | ^^^^^^^^^^^

View File

@ -1,6 +1,6 @@
//@ run-pass //@ run-pass
//@ ignore-windows //@ ignore-windows
//@ ignore-macos //@ ignore-apple
//@ ignore-wasm32 common linkage not implemented right now //@ ignore-wasm32 common linkage not implemented right now
#![feature(linkage)] #![feature(linkage)]

View File

@ -1,6 +1,6 @@
//@ run-pass //@ run-pass
//@ ignore-windows //@ ignore-windows
//@ ignore-macos //@ ignore-apple
//@ ignore-emscripten doesn't support this linkage //@ ignore-emscripten doesn't support this linkage
//@ ignore-sgx weak linkage not permitted //@ ignore-sgx weak linkage not permitted
//@ aux-build:linkage1.rs //@ aux-build:linkage1.rs

View File

@ -4,7 +4,7 @@
//@ ignore-emscripten no weak symbol support //@ ignore-emscripten no weak symbol support
//@ ignore-windows no extern_weak linkage //@ ignore-windows no extern_weak linkage
//@ ignore-macos no extern_weak linkage //@ ignore-apple no extern_weak linkage
//@ aux-build:lib.rs //@ aux-build:lib.rs

View File

@ -1,7 +1,5 @@
//@ ignore-macos //@ ignore-apple
//@ ignore-ios
//@ compile-flags:-l framework=foo //@ compile-flags:-l framework=foo
//@ error-pattern: library kind `framework` is only supported on Apple targets //@ error-pattern: library kind `framework` is only supported on Apple targets
fn main() { fn main() {}
}

View File

@ -5,12 +5,11 @@
//@ no-prefer-dynamic //@ no-prefer-dynamic
//@ ignore-wasm32 no processes //@ ignore-wasm32 no processes
//@ ignore-sgx no processes //@ ignore-sgx no processes
//@ ignore-macos
extern crate exit_success_if_unwind; extern crate exit_success_if_unwind;
use std::process::Command;
use std::env; use std::env;
use std::process::Command;
fn main() { fn main() {
let mut args = env::args_os(); let mut args = env::args_os();
@ -25,7 +24,6 @@ fn main() {
let mut cmd = Command::new(env::args_os().next().unwrap()); let mut cmd = Command::new(env::args_os().next().unwrap());
cmd.arg("foo"); cmd.arg("foo");
// ARMv6 hanges while printing the backtrace, see #41004 // ARMv6 hanges while printing the backtrace, see #41004
if cfg!(target_arch = "arm") && cfg!(target_env = "gnu") { if cfg!(target_arch = "arm") && cfg!(target_env = "gnu") {
cmd.env("RUST_BACKTRACE", "0"); cmd.env("RUST_BACKTRACE", "0");

View File

@ -4,10 +4,9 @@
//@ no-prefer-dynamic //@ no-prefer-dynamic
//@ ignore-wasm32 no processes //@ ignore-wasm32 no processes
//@ ignore-sgx no processes //@ ignore-sgx no processes
//@ ignore-macos
use std::process::Command;
use std::env; use std::env;
use std::process::Command;
struct Bomb; struct Bomb;
@ -23,7 +22,6 @@ fn main() {
if let Some(s) = args.next() { if let Some(s) = args.next() {
if &*s == "foo" { if &*s == "foo" {
let _bomb = Bomb; let _bomb = Bomb;
panic!("try to catch me"); panic!("try to catch me");

View File

@ -2,7 +2,6 @@
//@ compile-flags:-C panic=abort //@ compile-flags:-C panic=abort
//@ no-prefer-dynamic //@ no-prefer-dynamic
//@ ignore-macos
#![feature(panic_abort)] #![feature(panic_abort)]

View File

@ -7,6 +7,10 @@
//@ ignore-sgx no processes //@ ignore-sgx no processes
//@ ignore-fuchsia must translate zircon signal to SIGABRT, FIXME (#58590) //@ ignore-fuchsia must translate zircon signal to SIGABRT, FIXME (#58590)
//@ ignore-nto no stack overflow handler used (no alternate stack available) //@ ignore-nto no stack overflow handler used (no alternate stack available)
//@ ignore-ios stack overflow handlers aren't enabled
//@ ignore-tvos stack overflow handlers aren't enabled
//@ ignore-watchos stack overflow handlers aren't enabled
//@ ignore-visionos stack overflow handlers aren't enabled
#![feature(rustc_private)] #![feature(rustc_private)]

View File

@ -1,4 +1,4 @@
//@ ignore-macos: cycle error does not appear on apple //@ ignore-apple: cycle error does not appear on apple
use std::sync::Mutex; use std::sync::Mutex;

View File

@ -30,8 +30,8 @@ struct Outer {
t: Inner t: Inner
} }
#[cfg(any(
#[cfg(any(target_os = "android", target_os = "android",
target_os = "dragonfly", target_os = "dragonfly",
target_os = "emscripten", target_os = "emscripten",
target_os = "freebsd", target_os = "freebsd",
@ -39,12 +39,12 @@ struct Outer {
target_os = "hurd", target_os = "hurd",
target_os = "illumos", target_os = "illumos",
target_os = "linux", target_os = "linux",
target_os = "macos",
target_os = "netbsd", target_os = "netbsd",
target_os = "openbsd", target_os = "openbsd",
target_os = "solaris", target_os = "solaris",
target_os = "vxworks", target_os = "vxworks",
target_os = "nto", target_os = "nto",
target_vendor = "apple",
))] ))]
mod m { mod m {
#[cfg(target_arch = "x86")] #[cfg(target_arch = "x86")]