[llvm-dev] (Thin)LTO llvm build
Carsten Mattner via llvm-dev
llvm-dev at lists.llvm.org
Tue Dec 20 11:05:31 PST 2016
On Tue, Dec 20, 2016 at 5:05 PM, Teresa Johnson <tejohnson at google.com> wrote:
> Hi Carsten,
>
> A few responses below, but first, can you get the link command for
> lldb.so.3.9.1? Last time it was the lldb.so build that was using
> ld.bfd with the gold plugin which was exposing this issue.
Where would I find it in an otherwise already terminated process?
> On Tue, Dec 20, 2016 at 5:49 AM, Carsten Mattner <carstenmattner at gmail.com>
> No problem - I assumed no news was good news! Thanks for the
> explicit feedback though!
Sure, but it's important, and I've had my experience with never
hearing back even after asking for confirmation of success. Same as
drive-by patch drops.
> > - Should I avoid any and all CFLAGS, CXXFLAGS, CPPFLAGS, LDFLAGS
> > in favor of passing these exclusively as cmake's
> > -Dsomething_something=<FLAGS>? Linux distros usually have an
> > environment with CFLAGS etc. and use that building packages and
> > this didn't interfere in the past in my builds, but I'm open to
> > avoid this by unsetting any such variables first.
>
>
> The problem I've had in the past setting *FLAGS on the cmake command
> line is that sometimes the configure fails because it uses those
> flags in various configuration checking compiles. So typically I
> hand edit the resulting CMakeCache.txt if I want to pass specific
> options to the build. Note that there are various flavors of e.g.
> LINKER_FLAGS that get passed to different types of links though
> (SHARED vs EXE etc). I haven't tried setting CFLAGS etc env
> variables before kicking off the ninja build to pass args.
I set the variables before running cmake and I didn't expect for it to
be re-considered when running ninja, but it would of course more
closely mirror make's behavior if it does/dit.
> > - Is there a configuration in the CI matrix that builds all
> > of LLVM with ThinLTO so that I can be reasonably sure
> > any error is most likely local to my environment or
> > because of operator (silly me) faults?
>
>
> There is an lld based ThinLTO buildbot. I've been really remiss in
> not setting up a gold based ThinLTO bot...note to self to get that
> done asap! But the existing lld will be head not 3.9.
Please have it build everything that's buildable in the llvm tree.
> > I also pass these in LDFLAGS but they're not visible
> > in the error trace below:
> > -Wl,-plugin-opt,-function-sections \
> > -Wl,-plugin-opt,-data-sections \
>
>
> Hmm, looks like LDFLAGS doesn't work for passing to the resulting link line?
> Try setting in the CMakeCache.txt as described above.
It's a mystery (aka haven't traced/debugged CMake).
> > Any idea why lldb-argdumper would fail to link reproducably?
>
> See suggestion above about looking at lldb.so.3.9.1 link line. Let's
> make sure that looks ok first.
Thanks.
More information about the llvm-dev
mailing list