Skip to content

psm: select Mach-O assembly for watchOS and visionOS - #162

Closed
matthargett wants to merge 1 commit into
rust-lang:masterfrom
matthargett:psm-watchos-visionos
Closed

matthargett wants to merge 1 commit into
rust-lang:masterfrom
matthargett:psm-watchos-visionos

Conversation

@matthargett

Copy link
Copy Markdown

This is #152 with the commit message shortened, as asked there. The diff and the authorship are @proggeramlug's; I only rewrote the message and rebased it on current master. Happy to close this if #152 gets updated instead.

The Apple branch of the assembly guards lists macOS, iOS and tvOS (#142), so *-apple-watchos and *-apple-visionos fall through to the ELF branch and fail to assemble:

psm@0.1.32: src/arch/aarch_aapcs64.s:32:1: error: unknown directive
.type rust_psm_stack_direction,@function

I hit this building for an Apple Watch, where psm arrives through pest 2.9.

Checked with Rust 1.98 on macOS:

  • cargo build --target aarch64-apple-watchos in psm/ fails on master with the error above and builds with this change.
  • Before this change I worked around it with CFLAGS_aarch64_apple_watchos=-DCFG_TARGET_OS_ios, which selects the same branch. That binary runs on an Apple Watch Series 10 (watchOS 27.2).
  • I did not build visionOS; the target is not installed here.

The Apple branch of the assembly guards listed macOS, iOS and tvOS only, so
watchOS and visionOS targets got the ELF `.type`/`.size` directives and failed
to assemble. Add both to the guard in the four files that carry it.
@matthargett

Copy link
Copy Markdown
Author

CI failure looks unrelated:

error: toolchain 'nightly-i686-pc-windows-gnu' may not be able to run on this system
note: to build software for that platform, try `rustup target add i686-pc-windows-gnu` instead
note: add the `--force-non-host` flag to install the toolchain anyway
Error: Process completed with exit code 1.

@nagisa

nagisa commented Nov 21, 2026

Copy link
Copy Markdown
Member

Merged #152 instead.

@nagisa nagisa closed this Nov 21, 2026
@matthargett
matthargett deleted the psm-watchos-visionos branch November 21, 2026 22:38
@matthargett

Copy link
Copy Markdown
Author

Merged #152 instead.

thanks! can you cut a release with the change? lmk if you want help getting the CI passing! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants