diff options
| author | bors <bors@rust-lang.org> | 2024-04-05 22:12:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-05 22:12:43 +0000 |
| commit | 11853ecd86c10dcc8b10d2bbf737fbf9bffe27bc (patch) | |
| tree | 74cbdf5b014e99d96e3f561ed1dd4374648bfb7c /src | |
| parent | 9d79cd5f79e75bd0d2083260271307ce9acd9081 (diff) | |
| parent | a074d278d30df4d4a3d6cd55117e6fdddfc9dd25 (diff) | |
| download | rust-11853ecd86c10dcc8b10d2bbf737fbf9bffe27bc.tar.gz rust-11853ecd86c10dcc8b10d2bbf737fbf9bffe27bc.zip | |
Auto merge of #123517 - GuillaumeGomez:rollup-eys3jfp, r=GuillaumeGomez
Rollup of 8 pull requests Successful merges: - #121419 (Add aarch64-apple-visionos and aarch64-apple-visionos-sim tier 3 targets) - #123159 (Fix target-cpu fpu features on Arm R/M-profile) - #123487 (CFI: Restore typeid_for_instance default behavior) - #123500 (Revert removing miri jobserver workaround) - #123505 (Revert "Use OS thread name by default") - #123509 (Add jieyouxu to compiler review rotation and as a reviewer for `tests/run-make`, `src/tools/run-make-support` and `src/tools/compiletest`) - #123514 (Fix typo in `compiler/rustc_middle/src/traits/solve/inspect.rs`) - #123515 (Use `include` command to reduce code duplication) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/llvm.rs | 3 | ||||
| -rw-r--r-- | src/bootstrap/src/lib.rs | 3 | ||||
| -rw-r--r-- | src/doc/rustc/src/SUMMARY.md | 1 | ||||
| -rw-r--r-- | src/doc/rustc/src/platform-support.md | 2 | ||||
| -rw-r--r-- | src/doc/rustc/src/platform-support/apple-visionos.md | 53 | ||||
| -rw-r--r-- | src/librustdoc/clean/cfg.rs | 1 | ||||
| -rw-r--r-- | src/tools/compiletest/src/raise_fd_limit.rs | 2 | ||||
| -rw-r--r-- | src/tools/miri/cargo-miri/src/phases.rs | 7 |
8 files changed, 69 insertions, 3 deletions
diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs index e461e11677f..420336fee14 100644 --- a/src/bootstrap/src/core/build_steps/llvm.rs +++ b/src/bootstrap/src/core/build_steps/llvm.rs @@ -365,10 +365,11 @@ impl Step for Llvm { cfg.define("LLVM_ENABLE_ZLIB", "OFF"); } - // Are we compiling for iOS/tvOS/watchOS? + // Are we compiling for iOS/tvOS/watchOS/visionOS? if target.contains("apple-ios") || target.contains("apple-tvos") || target.contains("apple-watchos") + || target.contains("apple-visionos") { // These two defines prevent CMake from automatically trying to add a MacOSX sysroot, which leads to a compiler error. cfg.define("CMAKE_OSX_SYSROOT", "/"); diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index 44452446eb8..bcb8260b15a 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -92,8 +92,9 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &str, Option<&[&'static str]>)] = &[ (Some(Mode::Std), "backtrace_in_libstd", None), /* Extra values not defined in the built-in targets yet, but used in std */ (Some(Mode::Std), "target_env", Some(&["libnx", "p2"])), - // (Some(Mode::Std), "target_os", Some(&[])), + (Some(Mode::Std), "target_os", Some(&["visionos"])), (Some(Mode::Std), "target_arch", Some(&["arm64ec", "spirv", "nvptx", "xtensa"])), + (Some(Mode::ToolStd), "target_os", Some(&["visionos"])), /* Extra names used by dependencies */ // FIXME: Used by serde_json, but we should not be triggering on external dependencies. (Some(Mode::Rustc), "no_btreemap_remove_entry", None), diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md index 83acce80f96..db85753145d 100644 --- a/src/doc/rustc/src/SUMMARY.md +++ b/src/doc/rustc/src/SUMMARY.md @@ -21,6 +21,7 @@ - [arm64ec-pc-windows-msvc](platform-support/arm64ec-pc-windows-msvc.md) - [\*-apple-tvos](platform-support/apple-tvos.md) - [\*-apple-watchos\*](platform-support/apple-watchos.md) + - [aarch64-apple-visionos\*](platform-support/apple-visionos.md) - [aarch64-nintendo-switch-freestanding](platform-support/aarch64-nintendo-switch-freestanding.md) - [armeb-unknown-linux-gnueabi](platform-support/armeb-unknown-linux-gnueabi.md) - [arm-none-eabi](platform-support/arm-none-eabi.md) diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index aa982a44503..f7836f18cf9 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -243,6 +243,8 @@ target | std | host | notes [`aarch64-apple-tvos-sim`](platform-support/apple-tvos.md) | ? | | ARM64 tvOS Simulator [`aarch64-apple-watchos`](platform-support/apple-watchos.md) | ✓ | | ARM64 Apple WatchOS [`aarch64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | ARM64 Apple WatchOS Simulator +[`aarch64-apple-visionos`](platform-support/apple-visionos.md) | ✓ | | ARM64 Apple visionOS +[`aarch64-apple-visionos-sim`](platform-support/apple-visionos.md) | ✓ | | ARM64 Apple visionOS Simulator [`aarch64-kmc-solid_asp3`](platform-support/kmc-solid.md) | ✓ | | ARM64 SOLID with TOPPERS/ASP3 [`aarch64-nintendo-switch-freestanding`](platform-support/aarch64-nintendo-switch-freestanding.md) | * | | ARM64 Nintendo Switch, Horizon [`aarch64-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ | diff --git a/src/doc/rustc/src/platform-support/apple-visionos.md b/src/doc/rustc/src/platform-support/apple-visionos.md new file mode 100644 index 00000000000..9874126e42f --- /dev/null +++ b/src/doc/rustc/src/platform-support/apple-visionos.md @@ -0,0 +1,53 @@ +# aarch64-apple-visionos\* + +- aarch64-apple-visionos +- aarch64-apple-visionos-sim + +**Tier: 3** + +Apple visionOS targets: + +- Apple visionOS on arm64 +- Apple visionOS Simulator on arm64 + +## Target maintainers + +- [@agg23](https://github.com/agg23) +- [@madsmtm](https://github.com/madsmtm) + +## Requirements + +These targets are cross-compiled. +To build these targets Xcode 15 or higher on macOS is required, along with LLVM 18. + +## Building the target + +The targets can be built by enabling them for a `rustc` build, for example: + +```toml +[build] +build-stage = 1 +target = ["aarch64-apple-visionos-sim"] +``` + +## Building Rust programs + +_Note: Building for this target requires the corresponding visionOS SDK, as provided by Xcode 15+._ + +Rust programs can be built for these targets, if `rustc` has been built with support for them, for example: + +```text +rustc --target aarch64-apple-visionos-sim your-code.rs +``` + +## Testing + +There is no support for running the Rust testsuite on visionOS or the simulators. + +There is no easy way to run simple programs on visionOS or the visionOS simulators. Static library builds can be embedded into visionOS applications. + +## Cross-compilation toolchains and C code + +This target can be cross-compiled from x86_64 or aarch64 macOS hosts. + +Other hosts are not supported for cross-compilation, but might work when also providing the required Xcode SDK. diff --git a/src/librustdoc/clean/cfg.rs b/src/librustdoc/clean/cfg.rs index 277db90df9a..2814e83dcd7 100644 --- a/src/librustdoc/clean/cfg.rs +++ b/src/librustdoc/clean/cfg.rs @@ -511,6 +511,7 @@ impl<'a> fmt::Display for Display<'a> { "wasi" => "WASI", "watchos" => "watchOS", "windows" => "Windows", + "visionos" => "visionOS", _ => "", }, (sym::target_arch, Some(arch)) => match arch.as_str() { diff --git a/src/tools/compiletest/src/raise_fd_limit.rs b/src/tools/compiletest/src/raise_fd_limit.rs index bc2946e2c13..a4235381beb 100644 --- a/src/tools/compiletest/src/raise_fd_limit.rs +++ b/src/tools/compiletest/src/raise_fd_limit.rs @@ -4,7 +4,7 @@ /// on the number of cores available. /// /// This fixes issue #7772. -#[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))] +#[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos", target_os = "visionos"))] #[allow(non_camel_case_types)] pub unsafe fn raise_fd_limit() { use std::cmp; diff --git a/src/tools/miri/cargo-miri/src/phases.rs b/src/tools/miri/cargo-miri/src/phases.rs index efa3fb0c77d..3f6c484a057 100644 --- a/src/tools/miri/cargo-miri/src/phases.rs +++ b/src/tools/miri/cargo-miri/src/phases.rs @@ -558,6 +558,13 @@ pub fn phase_runner(mut binary_args: impl Iterator<Item = String>, phase: Runner // Set missing env vars. We prefer build-time env vars over run-time ones; see // <https://github.com/rust-lang/miri/issues/1661> for the kind of issue that fixes. for (name, val) in info.env { + // `CARGO_MAKEFLAGS` contains information about how to reach the jobserver, but by the time + // the program is being run, that jobserver no longer exists (cargo only runs the jobserver + // for the build portion of `cargo run`/`cargo test`). Hence we shouldn't forward this. + // Also see <https://github.com/rust-lang/rust/pull/113730>. + if name == "CARGO_MAKEFLAGS" { + continue; + } if let Some(old_val) = env::var_os(&name) { if old_val == val { // This one did not actually change, no need to re-set it. |
