[M3devel] C backend -- mode or call quake?

Antony Hosking hosking at cs.purdue.edu
Fri Oct 12 19:23:59 CEST 2012


Why not treat it like the current gcc-based approach?  The builder generates C and quake invokes the C compiler.  Just like for gcc: the builder generates .mc and quake invokes m3cgc1.  I will want much the same for LLVM.  The builder will generate LLVM IR binaries and the LLVM tools will do the rest (invoked from quake).  This makes it relatively easy to do cross builds from quake.

On Oct 12, 2012, at 12:50 PM, Jay K <jay.krell at cornell.edu> wrote:

> Clarification: it is "integrated" either way -- no production of .mc files.
> Just that cm3/builder would know that "IntegratedC" produce a .c file (or perhaps is writing to a pipe) and to then run the C compiler. Vs. pushing that into the backend itself and leaving cm3/builder with "IntegratedObject" that it already knows how to deal with. Either way cm3/builder has to change.
> 
> 
> Currently I'm going through config-only changes.
> 
> 
>  - Jay
> 
> 
> CC: m3devel at elegosoft.com
> From: antony.hosking at gmail.com
> Subject: Re: [M3devel] C backend -- mode or call quake?
> Date: Fri, 12 Oct 2012 09:12:53 -0400
> To: jay.krell at cornell.edu
> 
> I vote for integrated. 
> 
> Sent from my iPhone
> 
> On Oct 12, 2012, at 0:43, Jay K <jay.krell at cornell.edu> wrote:
> 
> ok..so..I think time to make this decision and implement it.
> 
>  - add a "mode" for C and deal with it in Builder.m3
>   I implemented and tested that and presented the diff a few weeks ago
>   It is reasonable, simple, works..but it isn't strictly needed.
> 
> or
> 
> - use IntegratedObject and have the C backend call the C compiler "itself" (via the
> existing quake/config files)
> I can go ahead and implement that.
> 
> 
> Either way, cm3 likely must know about the C backend.
> It at least has to "new" it, and maybe pass down function pointers for running
> the C compiler -- or maybe M3C can get the pointers itself.
> 
> Or I can put this off a bit longer and improve the generated C...
> Using "integrated" saves us from writing and reading back the .mc files.
> More efficient.
> 
> 
>  - Jay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20121012/740e11cc/attachment-0002.html>


More information about the M3devel mailing list