Skip to content

robius-speech: link clang's runtime library on Apple platforms - #29

Merged
kevinaboos merged 1 commit into
mainfrom
fix_swift_availability_link
Oct 6, 2026
Merged

kevinaboos merged 1 commit into
mainfrom
fix_swift_availability_link

Conversation

@kevinaboos

Copy link
Copy Markdown
Member

Linking an iOS app with robius-speech fails with undefined ___isPlatformVersionAtLeast (Swift's #available checks) or ___chkstk_darwin, since rustc links Apple targets with -nodefaultlibs and so leaves out clang's runtime library. This broke Robrix's beta.2 TestFlight build in CI (Xcode 26.3).

The build script now links clang_rt.ios (or clang_rt.iossim/clang_rt.osx) from clang's resource directory. A minimal iOS binary using robius-speech failed to link before this and links fine with it; macOS still links fine too.

The Swift bridge calls into clang's runtime library, e.g. `__isPlatformVersionAtLeast`
for its `#available` checks and `__chkstk_darwin` for stack probes. rustc links Apple
targets with `-nodefaultlibs`, which leaves that library out, so linking an iOS app failed
(as in Robrix's TestFlight build with Xcode 26.3). The build script now links
`clang_rt.ios` (or `clang_rt.iossim`/`clang_rt.osx`) from clang's resource directory.
@kevinaboos
kevinaboos merged commit aea7a4f into main Oct 6, 2026
4 checks passed
kevinaboos added a commit to project-robius/robrix that referenced this pull request Oct 6, 2026
iOS needed a fix to `robius-speech`, see this PR:
<project-robius/robius#29>

windows needed a robius-packaging-commands fix, see this:
<project-robius/robius-packaging-commands#15>
which is now published to crates.io as v0.4.1

macOS notarization failed cuz apple's notary server is super slow
today so i dunno what we can do about that. One of them did succeed
eventually after like 1.5 hours. yikes
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