[llvm] r219976 - Initial version of Go bindings.

Peter Collingbourne peter at pcc.me.uk
Tue Oct 21 15:07:15 PDT 2014


On Tue, Oct 21, 2014 at 09:34:01PM +0000, Eric Christopher wrote:
> On Tue Oct 21 2014 at 2:10:27 PM David Blaikie <dblaikie at gmail.com> wrote:
> 
> >
> >
> > On Tue, Oct 21, 2014 at 2:05 PM, Peter Collingbourne <peter at pcc.me.uk>
> > wrote:
> >
> >> On Mon, Oct 20, 2014 at 04:38:07PM -0700, David Blaikie wrote:
> >> > On Mon, Oct 20, 2014 at 4:37 PM, David Blaikie <dblaikie at gmail.com>
> >> wrote:
> >> >
> >> > >
> >> > >
> >> > > On Mon, Oct 20, 2014 at 4:14 PM, Peter Collingbourne <peter at pcc.me.uk
> >> >
> >> > > wrote:
> >> > >
> >> > >> How are you invoking the compiler in your build (i.e. what are the
> >> values
> >> > >> of config.host_cc and config.host_cxx in
> >> $builddir/test/lit.site.cfg)?
> >> > >>
> >> > >
> >> > > config.host_cc = "/usr/local/google/home/blaikie/install/bin/clang "
> >> > > config.host_cxx = "/usr/local/google/home/blaikie/install/bin/clang++
> >> "
> >> > >
> >> >
> >> > Oh, and those are symlinks:
> >> >
> >> > lrwxrwxrwx 1 blaikie eng 9 Sep 18 20:07
> >> > /usr/local/google/home/blaikie/install/bin/clang -> clang-3.4*
> >> > lrwxrwxrwx 1 blaikie eng 5 Oct 10 11:06
> >> > /usr/local/google/home/blaikie/install/bin/clang++ -> clang*
> >>
> >> I debugged this off-list with David and we found the source of his
> >> problem: the
> >> presence of the -gsplit-dwarf flag in the output of "llvm-config
> >> --cppflags"
> >> causes one part of the Go toolchain ("cgo") to blow up, as it does not
> >> understand split DWARF.
> >>
> >> Regardless of whether cgo supports split DWARF, that flag should not
> >> appear
> >> in llvm-config's output. I'll see what I can do about removing it.
> >>
> >
> > (+echristo as he added the split-dwarf support & might have some opinions
> > on how it should/shouldn't interact with llvm-config --cppflags)
> >
> >
> 
> Honestly I didn't think about it much. It should probably get migrated
> along, because otherwise how would you pass that along?

We might want the flag to appear in --cflags and --cxxflags. But it shouldn't
appear in --cppflags, as that should contain only preprocessor flags.

> That said, stripping it out for now is fine. cgo should probably learn how
> to deal with .dwo files at some point.

Perhaps, but I'd expect that if cgo uses cppflags on its own it should be
able to rely on those flags not changing the output format.

Thanks,
-- 
Peter



More information about the llvm-commits mailing list