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

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

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::Dylib => Some(if cfg!(windows) {
format!("{}.dll", lib)
} else if cfg!(target_os = "macos") {
} else if cfg!(target_vendor = "apple") {
format!("lib{}.dylib", lib)
} else {
format!("lib{}.so", lib)

View file

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

View file

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

View file

@ -15,7 +15,7 @@ use std::path::{Path, PathBuf};
const ENTRY_LIMIT: u32 = 900;
// 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] = &[
"rs", // test source files