On Wed, Apr 29, 2015 at 5:56 PM, Aldy Hernandez <al...@redhat.com> wrote:
>
> Despite what Go thinks:
>
>   /* The debug hooks are used to implement -fdump-go-spec because it
>      gives a simple and stable API for all the information we need to
>      dump.  */
>
> ...the debug hooks are not stable... :).

Alas.


> With this patch I have done my best to give Go what it wants without
> recreating what the front-ends were doing.  I've made the go_decl() call
> work from within the early_global_decl() hook which gets called as we parse
> (rest_of_decl_compilation).  I far as I understand, this hack is a one-time
> thing for use internally in the build process, so we don't care whether
> go_decl() will receive location information??

That is true: the goal is to output the declarations in Go syntax;
location information is irrelevant.


> Is there not a more modern way of Go getting the DECLs it needs without
> abusing the debug_hook machinery?

I don't know.

Thanks for working on this.  Have you tried building with
--enable-languages=go?  On a GNU/Linux system it should build and pass
all tests with no extra effort.

Ian

Reply via email to