This is the mail archive of the
mailing list for the GCC project.
Re: scripting interface to GCC ?
Daniel Berlin wrote:
> On Mon, 2006-03-13 at 16:25 -0700, Tom Tromey wrote:
>>>>>>> "Mike" == Mike Mattie <email@example.com> writes:
>> Mike> Has anyone ever tried to build a scripting interface into the guts of
>> Mike> GCC with something like SWIG ?
>> I've heard of a couple efforts along these lines -- once with Scheme
>> and once with Python. I don't know if either used SWIG. Neither one
>> was submitted to GCC. Both were obscure enough that, even now, I
>> can't really be sure they ever existed :-)
> I will admit i SWIG'd gcc, once, and generated python wrappers, but this
> was before tree-ssa, so it wasn't all that useful.
> There is some appeal to being able to prototype passes, etc, in python.
> It's a ton of work to get the bindings going though.
> Maybe SWIG is much better than it was, in which case, cool!
That was my biggest question about the idea, gcc's internal data
structures are very sophisticated. In either event I will find
out for myself soon enough.
It is good to know that someone else has tried , it would be bizarre
if no one had thought of it before.