-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Darwin: add libSystem.tbd for macOS 14 (Sonoma) #16036
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
Conversation
|
If you get a build of zig from the CI (running older macOS version) and just add this file, zig works correctly. Sadly, this patch is not enough to make zig build itself. There are many errors for missing header files, like `sys/cdefs.h'. $ cp -r /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//usr/include/ lib/libc/include/any-macos-anyfixes the issue, but adds hundreds of files to the repo. I don't know how it was decided which headers to be added to the repo, so someone with more expertise should probably review this. |
|
Thanks for the PR! Please note that our policy is to add the headers/libsystem stabs when Apple releases the OS for general use, plus it should be initiated by a core team member as it requires more than adding a new |
|
Have you considered changing this policy? I'm just stopping by as an outsider but I will put forth that requiring everyone who is doing bringup of software for the new OS to carry patches is somewhat annoying. I understand not wanting provide official support for an OS that has not been released yet, but I personally find that one of the best ways to evolve on support for a new OS is to just start carrying the code for it and having people report issues as they encounter them. |
I apologise for this inconvenience but we are simply stretched too thin as it is to even consider doing this at this time. Once we stabilise the language and the compiler however (i.e., not sooner than by 1.0 release), I am happy to revisit this. |
|
I think one thing that would help users in this case is if it was more clear how to compile natively using system headers and system .tbd files rather than using zig's bundled installation data. I believe Zig already supports this but you have to pass --sysroot. This seems like a better thing for users to do in the meantime than to attempt to patch in the new headers & linker information. |
That's a very good point. Perhaps we should create a wiki page outlining this? |
is there a reason why zig doesn't try and detect if a sysroot is available and use those definitions over the bundled ones? I wouldn't mind submitting a PR enabling that behavior. |
|
I am in favor of that change, as long as the use case where Zig still works without XCode installed on supported OS versions is preserved. |
Oh, we used to do that and then we decided not to do that, but as far as I am concerned we could go back to doing that. 😅 Anyhow, if y'all don't mind, I'd like to handle this one in order to ensure there are no unforeseen problems down the line. |
Discussed here: #15963