-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added tvos-sim support #951
Conversation
CC: @phatblat for eventual visionOS support additions |
src/lib.rs
Outdated
cmd.args.push( | ||
format!("--target={}-apple-tvos{}", arch, deployment_target).into(), | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems to misalign with XCode at least. When building Objective-C with clang
via XCode it passes the -target
flag to convey the deployment target: -target arm64-apple-tvos16.0
instead of the os-version-min
flag we pass (which doesn't seem documented for tvOS/watchOS? ignoring that though...)
Did you try building any libs with this just to make sure? I didn't see a problem getting the deployment target into the final Mach-o executable at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a good point. I will add back this code as everything worked fine either way and that will align it with XCode's behavior.
As for libraries that I built this on there are two. Blake3 and Ring. Both are dependencies of the project I am working on Ditto which is included in my iPad/tvOS application/s.
the produced binary Mach-O Platform type was verified with otool.
.github/workflows/main.yml
Outdated
@@ -113,6 +113,24 @@ jobs: | |||
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos --release | |||
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos --features parallel | |||
|
|||
# This is separate from the matrix above because there is no prebuilt rust-std component for the target. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you create a new matrix to combine this with the aarch64-apple-tvos test above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Be-ing I updated to have a matrix for all -Z build-std targets. The only ones right now are tvOS targets but any tier 3 targets would fall in this same bucket as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This PR allows using cc-rs lib to target tier 3 *-apple builds simulator builds
how was this tested: