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:
I'm starting to wonder... should we perhaps lower to ZIR instead of AIR? The integration would be a lot less messy, and it's much more obvious how to parallelize it. One .c file would produce exactly one corresponding ZIR file. 🤔🤔🤔
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.
krk, lin72h, easbarba, jinzhongjia, crispy-strawberry and 2 moreianprime0509, lin72h, BratishkaErik and crispy-strawberrycandrewlee14
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4