-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support visionOS, watchOS, and tvOS #103
base: master
Are you sure you want to change the base?
Conversation
// The full list of clang targtes may be: | ||
// https://github.com/llvm/llvm-project/blob/7476c20c481cbccbdb89139fb94620e083015932/llvm/include/llvm/BinaryFormat/MachO.def#L123-L138 | ||
let clang_target = match target { | ||
"aarch64-apple-ios" => "arm64-apple-ios", | ||
"aarch64-apple-visionos" => "arm64-apple-xros", | ||
"aarch64-apple-visionos-sim" => "aarch64-apple-xros-simulator", | ||
"aarch64-apple-darwin" => "arm64-apple-darwin", | ||
target => 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.
I am unsure that this link is fully relevant/correct. Getting the target triple of aarch64-apple-xros-simulator
took a bit of brute force... now that I look at it, I don't know that I tried This passes with both arm64-aple-xros-simulator
as a target.aarch64-apple-xros-simulator
and arm64-apple-xros-simulator
. Neither are close to the rust target triples so I have no idea what to use.
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.
there was a conversation about this at clang and rust-lang.
Apple originally rolled out xros
targets in llvm and clang. Later they released visionOS
branding and that's what Xcode uses, but Xcode translates it to xros
and sends it to clang. See my #102 notes.
f1073c1
to
3844827
Compare
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.
Not familiar enough with CoreAudio to really say something useful here, looks good from at quick skim.
build.rs
Outdated
println!("cargo:rustc-link-lib=framework=AudioToolbox"); | ||
} | ||
if !target.contains("apple-watchos") { | ||
headers.push("AudioUnit/AudioUnit.h"); | ||
} |
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.
If the headers aren't available on watchOS, maybe it would be prudent to also not (try to) link?
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.
+1 on watchOS
Co-authored By: Eugene Hauptmann <[email protected]>
3844827
to
9cc7712
Compare
This work piggy backs off the work in #102.
Things are a bit rough. Based on my exploration of SDK's (that I have on my box),
OpenAL
is on macOS, tvOS and iOS but not watchOS or visionOS. Other thanOpenAL
, it seems thatvisionOS
,watchOS
andtvOS
all act likeiOS
.CC @madsmtm the
visionOS
clang target here I think is relevant to your interests.