Skip to content

psm: add tvOS to Apple platform checks in assembly files#142

Open
TevJ wants to merge 1 commit intorust-lang:masterfrom
TevJ:add_tvos_support
Open

psm: add tvOS to Apple platform checks in assembly files#142
TevJ wants to merge 1 commit intorust-lang:masterfrom
TevJ:add_tvos_support

Conversation

@TevJ
Copy link

@TevJ TevJ commented Mar 23, 2026

Adds the CFG_TARGET_OS_tvos to the Apple platform preprocessor guards in psm's assembly files.

tvOS uses the same Mach-O underscore-prefixed symbol naming convention as macOS and iOS, but the assembly guards don't currently include it. This caused incorrect symbol names when compiling for targets like aarch64-apple-tvos.

We build an SDK which uses psm and runs on tvOS. I have a local patch currently but it would be good to upstream it, we've had no issues running our build on tvOS devices.

I've applied the update to all four architecture-specific assembly files (aarch_aapcs64.s, x86_64.s, x86.s, arm_aapcs.s) for consistency, though in practice only aarch_aapcs64.s is relevant for tvOS targets.

Cheers!

The Mach-O symbol naming convention (underscore-prefixed symbols) applies
to all Apple platforms, but the preprocessor guards in the assembly files
only checked for darwin, macos, and ios. This adds tvos so that psm
produces correct symbol names when targeting aarch64-apple-tvos and
similar tvOS targets.
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.

1 participant