-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
compiler: update aro and translate-c to latest; delete clang translate-c #24497
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
base: master
Are you sure you want to change the base?
Conversation
1c4bddc
to
960d68b
Compare
960d68b
to
81092b4
Compare
When trying to communicate CLI options to the translate-c executable these are not yet handled:
manually reduced command:
fails:
(truncated) |
aha, aro does not support clang's C runtime includes, which makes sense.
stderr.txt contains:
|
81092b4
to
9cff3c5
Compare
280956f
to
dc91e5b
Compare
@Vexu do you recommend to also ship aro C headers, or do you think it is OK to use clang ones (the files in lib/include) |
Using the Clang headers didn't work when I last tried them. I don't remember why, might have been |
dc91e5b
to
7955ef9
Compare
I tried using this with tetris, however, translate-c created this dep file:
which caused ENOENT on |
That looks like the bug I fixed in Vexu/arocc@d0ebb59. |
the ziglang/translate-c package has its own test suite, so these are redundant
also add ability to omit main source file from dep file as it messes up caching strategy
solves several problems with this pattern
These are now maintained in a separate repository: ziglang/translate-c
behavior tests may not depend on this namespace.
66a769c
to
c3bc335
Compare
These warnings are a problem:
Maybe they can be addressed, but also I'm pretty sure they are supposed to be silenced because they are included with Also, what's the best way to convert Aro's errors to an ErrorBundle in Zig? Should we use |
Do you know how Edit: this one is an explicit
This makes me think aro is finding your system glibc instead of zig's glibc. |
it is indeed, and that is how it is supposed to work when compiling natively on the host. |
I see. For some reason I was thinking it was maybe getting headers from two different paths, but I see what you're saying about |
Sorry to be clear Aro is not finding system glibc - this is a middle ground between the translate-c package and status quo in which |
This deletes our implementation of translate-c which is based on libclang and replaces it with one based on arocc and translate-c.
Goodbye, and good riddance, to 5,940 lines of our remaining C++ code in the source repository, with 3,763 remaining.
Progress towards #20630. In the future, Zig will drop the
@cImport
language builtin, but for now, it remains, backed by Aro instead of Clang.Progress towards #16270
Upgrade Guide
This is technically a non-breaking change. While breakage is likely due to one C compiler being swapped out for another, if it occurs it is a bug rather than a feature.
So, cross your fingers when you upgrade and report a bug if something breaks.
Merge Checklist
jitCmd