A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ziglang/zig/issues/16269 below:

When the compiler is built without LLVM, use Aro to compile C code instead of Clang · Issue #16269 · ziglang/zig · GitHub

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:

  1. C code => Aro C AST => Translate C AST => zig source code
  2. From there, potentially give an additional lowering to Translate C AST:

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