Skip to content

add visionOS os target #18512

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

Closed
mitchellh opened this issue Jan 10, 2024 · 14 comments · Fixed by #19918
Closed

add visionOS os target #18512

mitchellh opened this issue Jan 10, 2024 · 14 comments · Fixed by #19918
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase.
Milestone

Comments

@mitchellh
Copy link
Contributor

I'm not sure what is involved to add this, but it'd be nice to be able to compile Zig libraries for Apple's new visionOS set to launch the end of this month. The SDK went final this past week. https://developer.apple.com/visionos/

@mitchellh mitchellh changed the title add visionOS cpu target add visionOS os target Jan 10, 2024
@nektro
Copy link
Contributor

nektro commented Jan 10, 2024

cc @kubkon

@nektro
Copy link
Contributor

nektro commented Jan 10, 2024

we'll also get it with llvm/llvm-project#77674

@andrewrk
Copy link
Member

Is it still a Darwin kernel? Should be a pretty trivial enhancement if so.

@mitchellh
Copy link
Contributor Author

mitchellh commented Jan 10, 2024

Is it still a Darwin kernel? Should be a pretty trivial enhancement if so.

Yes its Darwin. I think it'll probably have a different MachO object value (not sure what the right terminology it is), but don't expect other significant changes.

@andrewrk andrewrk added the enhancement Solving this issue will likely involve adding new logic or components to the codebase. label Jan 10, 2024
@andrewrk andrewrk added this to the 0.13.0 milestone Jan 10, 2024
@mitchellh
Copy link
Contributor Author

llvm/llvm-project#77707

The important bits:

  • Looks like the MachO values are there, 11 for xros and 12 for the simulator.
  • Another confirmation its just a Darwin kernel (though this was well known)

@kubkon
Copy link
Member

kubkon commented Jan 15, 2024

Potentially blocked by #18576

@mitchellh
Copy link
Contributor Author

LLVM merged visionOS support in the linker and clang: llvm/llvm-project#77674 (comment)

@andrewrk
Copy link
Member

so, do we call it xros like cowards, or visionos like lapdogs?

@mitchellh
Copy link
Contributor Author

so, do we call it xros like cowards, or visionos like lapdogs?

I recuse myself from this lmao.

@Rexicon226
Copy link
Contributor

so, do we call it xros like cowards, or visionos like lapdogs?

xros is vague and could apply to different things in the future; i think visionos is the way.

@jedisct1
Copy link
Contributor

xros is the SDK name in Xcode, so it's unlikely to apply to something different in the future.

That being said, this is a terrible name, and I'd also prefer the more self-explanatory visionos.

@kubkon
Copy link
Member

kubkon commented Jan 18, 2024

xros is the SDK name in Xcode, so it's unlikely to apply to something different in the future.

That being said, this is a terrible name, and I'd also prefer the more self-explanatory visionos.

Is it not the same with iOS though? I think it's referred to as iphoneos in Xcode (or xcrun at least) while LLVM and Zig refers to it as .ios. EDIT: my point being, if I am accurate, this gives us precedent to use .visionos instead of the cryptic .xros.

@andrewrk
Copy link
Member

Great point, let's proceed with visionos.

@kubkon
Copy link
Member

kubkon commented Apr 6, 2024

Prelim support in a branch https://github.com/ziglang/zig/tree/visionos. Full support is currently blocked on Zig embracing LLVM 18 which added support for VisionOS as a target. Standalone zld can handle it however provided kubkon/bold#129 and #19563 land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants