When the compiler is built without LLVM, use Aro to compile C code instead of Clang #16269
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
proposal
This issue suggests modifications. If it also has the "accepted" label then it is planned.
zig cc
Zig as a drop-in C compiler feature
Milestone
After solving #16268 which is a prerequisite to this issue, this issue is to further reduce dependency on Clang by using Aro to compile .c files.
I suggest, at least at first, this happens by taking advantage of translate-c, and then passing the outputted .zig code through the full pipeline. I experimented a bit with upstreaming Aro in #10795 in which I attempted to lower C AST to AIR, and this was my conclusion:
So the two options I think are worth exploring:
Another possibility would be straight from Aro C AST to ZIR. There could be additional C-specific ZIR instructions added if necessary.
The text was updated successfully, but these errors were encountered: