-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Self hosted libc hello world #1266
Conversation
also introduce `zig libc` command to display paths `zig libc file.txt` will parse equivalent text and use that for libc paths.
* outside fn definition * inside defer expression
* add c int types * some more ir stubs
also we are successfully analyzing the return type of main
we now have successful exit codes from main linking against libc
Just read your tweet about copying Windows files into those libc paths. I think an official zig docker image should be supplied for such cases, makes it so much easier. At least until zig ships with those libraries included or something that solves this ... which I guess is planned? At least e.g. in golang we do not have to copy libraries ourself. |
golang creates static binaries that have no dependency on libc, which is why you don't need those libraries. This is true in Zig as well - if you grab the stage1 compiler and do The difference is that golang doesn't support linking against libc when cross compiling for windows (as far as I'm aware) whereas zig does. Once stage2 supports all the language features used by |
okay |
What's left before merging to master: