[llvm-dev] (Thin)LTO llvm build

Teresa Johnson via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 4 11:11:35 PDT 2016


On Tue, Oct 4, 2016 at 10:15 AM, Carsten Mattner <carstenmattner at gmail.com>
wrote:

> On Tue, Oct 4, 2016 at 2:22 AM, Xinliang David Li <xinliangli at gmail.com>
> wrote:
> > For clang build, cmake flags:
> >
> >  -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold \
> >  -DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=gold \
> >  -DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=gold \
>
> Thanks, this didn't break the cmake run.
>
> I've been successfully using LDFLAGS, CXXFLAGS, CPPFLAGS, CFLAGS.
> It works, but now I wonder if it's safer to pass those via a
> -DCMAKE_CXXFLAGS.
> Any idea? If so, what are the LLVM CMake variables to set ldflags,
> cxxflags, cppflags, cflags?
>

I think the above cmake variables from David essentially set ldflags for
various types of links, which is where you need -fuse-ld, so no need to
pass them to c*flags.

Hopefully your ThinLTO build will work now. Let me know if you still run
into issues!

Teresa



-- 
Teresa Johnson |  Software Engineer |  tejohnson at google.com |  408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161004/164b30b6/attachment.html>


More information about the llvm-dev mailing list