[llvm-dev] (Thin)LTO llvm build

Teresa Johnson via llvm-dev llvm-dev at lists.llvm.org
Sun Sep 18 07:37:45 PDT 2016


On Sun, Sep 18, 2016 at 4:09 AM, Carsten Mattner <carstenmattner at gmail.com>
wrote:

> On Sun, Sep 18, 2016 at 6:30 AM, Mehdi Amini <mehdi.amini at apple.com>
> wrote:
>
> > I’m not sure I understand the question about lld. Lld will be a
> > different linker, with its own set of option. Actually we usually
> > rely on the clang driver to hide platform specific option and
> > provide a common interface to the user.
>
> I was thinking if I force lld, then the -Wl param will be the same
> across platforms, and I wouldn't have to accommodate for different
> linkers.
>

Actually, if you force lld you won't be able to get ThinLTO. The support
for ThinLTO is currently in gold via the gold plugin, and ld64. The ThinLTO
support is currently being added to the lld linker.

I was thinking of adding a clang option to control the parallelism. In gcc
the LTO parallelism can be specified by -flto=N. However, we are using
-flto[=Full,Thin] to specify the type of LTO. So perhaps a separate
-flto_parallelism=N.

Teresa



> > I don’t believe LDFLAGS is a valid cmake flag. You need to define
> > both CMAKE_EXE_LINKER_FLAGS and CMAKE_SHARED_LINKER_FLAGS.
>
> It respects it, as it should, or otherwise packagers would have to
> replicate CFLAGS, CXXFLAGS, etc. via CMAKE_*_FLAGS in package build
> descriptions.
>



-- 
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/20160918/4c06ccff/attachment.html>


More information about the llvm-dev mailing list