[zorg] r284153 - Added support for ThinLTO.

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 17:34:35 PDT 2016


Thanks for following up, Galina. I looked at the documentation a little bit
but haven't had a chance yet to pursue it. Looks like I first need to
figure out how to set up a buildslave here. I'll ask around and see what
we've done in the past or whether there is an existing one at Google that I
can leverage.

Teresa

On Thu, Oct 20, 2016 at 3:33 PM, Galina Kistanova <gkistanova at gmail.com>
wrote:

> Hello Teresa,
>
> For a ThinLTOwith gold, you could just use the getClangWithLTOBuildFactory
> with depends_on_projects=['llvm', 'clang'], and lto='thin'. On the builder
> you would need to link ld to gold.
> Feel free to ask if you will have questions or would need some help.
>
> Thanks
>
> Galina
>
>
>
>
> On Fri, Oct 14, 2016 at 12:39 PM, Galina Kistanova <gkistanova at gmail.com>
> wrote:
>
>> Hi Teresa,
>>
>> We do have a LTO builder with gold:
>> http://lab.llvm.org:8011/builders/clang-3stage-ubuntu.
>> Anyway, here is the a short explanation of how to add a bot:
>> http://llvm.org/docs/HowToAddABuilder.html
>> Hope it will help. Please feel free to ask if you have more questions.
>>
>> Thanks
>>
>> Galina
>>
>>
>>
>>
>> On Thu, Oct 13, 2016 at 2:56 PM, Teresa Johnson <tejohnson at google.com>
>> wrote:
>>
>>> Thanks for setting up an lld ThinLTO bot. I've been meaning do so for
>>> gold, but have no idea where to start. Does anyone have any pointers they
>>> could send me on how to set up bots?
>>> Thanks,
>>> Teresa
>>>
>>>
>>> On Thu, Oct 13, 2016, 2:46 PM Galina Kistanova via llvm-commits <
>>> llvm-commits at lists.llvm.org> wrote:
>>>
>>>> I am going to set it it builder definition, also I might change the
>>>> implementation in favor of cmake option LLVM_ENABLE_LTO={THIN,FULL}, which
>>>> I am in the middle of checking.
>>>>
>>>>
>>>>  {'name' : "clang-with-thin-lto-ubuntu",
>>>>          'slavenames' : ["ps4-buildslave1a"],
>>>>          'builddir' : "clang-with-thin-lto-ubuntu",
>>>>          'factory': ClangLTOBuilder.getClangWithLT
>>>> OBuildFactory(lto='thin'),
>>>>          'category'   : 'lld'},
>>>>
>>>>
>>>> Thanks
>>>>
>>>> Galina
>>>>
>>>>
>>>>
>>>> On Thu, Oct 13, 2016 at 1:13 PM, Davide Italiano <davide at freebsd.org>
>>>> wrote:
>>>>
>>>> On Thu, Oct 13, 2016 at 12:32 PM, Galina Kistanova via llvm-commits
>>>> <llvm-commits at lists.llvm.org> wrote:
>>>> > Author: gkistanova
>>>> > Date: Thu Oct 13 14:32:23 2016
>>>> > New Revision: 284153
>>>> >
>>>> > URL: http://llvm.org/viewvc/llvm-project?rev=284153&view=rev
>>>> > Log:
>>>> > Added support for ThinLTO.
>>>> >
>>>>
>>>> Thanks. I may miss something, but where are you actually setting
>>>> `-flto=thin` ?
>>>>
>>>> > Modified:
>>>> >     zorg/trunk/zorg/buildbot/builders/ClangLTOBuilder.py
>>>> >
>>>> > Modified: zorg/trunk/zorg/buildbot/builders/ClangLTOBuilder.py
>>>> > URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot
>>>> /builders/ClangLTOBuilder.py?rev=284153&r1=284152&r2=284153&view=diff
>>>> > ============================================================
>>>> ==================
>>>> > --- zorg/trunk/zorg/buildbot/builders/ClangLTOBuilder.py (original)
>>>> > +++ zorg/trunk/zorg/buildbot/builders/ClangLTOBuilder.py Thu Oct 13
>>>> 14:32:23 2016
>>>> > @@ -233,6 +233,7 @@ def getClangWithLTOBuildFactory(
>>>> >             jobs  = None,
>>>> >             extra_configure_args = None,
>>>> >             compare_last_2_stages = True,
>>>> > +           lto = None, # The string gets passed to -flto flag as is.
>>>> Like -flto=thin.
>>>> >             env = None):
>>>> >
>>>> >      # Set defaults
>>>> > @@ -305,11 +306,16 @@ def getClangWithLTOBuildFactory(
>>>> >      # Build all the remaining stages with exactly the same
>>>> configuration.
>>>> >
>>>> >      # Set proper compile and link flags.
>>>> > +    if lto:
>>>> > +        lto = '-flto=%s' % lto
>>>> > +    else:
>>>> > +        lto = '-flto'
>>>> > +
>>>> >      CmakeCommand.appendFlags(extra_configure_args, [
>>>> > -        ('-DCMAKE_CXX_FLAGS=',           ['-flto']),
>>>> > -        ('-DCMAKE_EXE_LINKER_FLAGS=',    ['-flto', '-fuse-ld=lld']),
>>>> > -        ('-DCMAKE_MODULE_LINKER_FLAGS=', ['-flto', '-fuse-ld=lld']),
>>>> > -        ('-DCMAKE_SHARED_LINKER_FLAGS=', ['-flto', '-fuse-ld=lld']),
>>>> > +        ('-DCMAKE_CXX_FLAGS=',           [lto]),
>>>> > +        ('-DCMAKE_EXE_LINKER_FLAGS=',    [lto, '-fuse-ld=lld']),
>>>> > +        ('-DCMAKE_MODULE_LINKER_FLAGS=', [lto, '-fuse-ld=lld']),
>>>> > +        ('-DCMAKE_SHARED_LINKER_FLAGS=', [lto, '-fuse-ld=lld']),
>>>> >          ])
>>>> >
>>>> >      # The rest are test stages, which depend on the staged compiler
>>>> we are ultimately after.
>>>> >
>>>> >
>>>> > _______________________________________________
>>>> > llvm-commits mailing list
>>>> > llvm-commits at lists.llvm.org
>>>> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>>
>>>> --
>>>> Davide
>>>>
>>>> "There are no solved problems; there are only problems that are more
>>>> or less solved" -- Henri Poincare
>>>>
>>>>
>>>> _______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at lists.llvm.org
>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>>
>>>
>>
>


-- 
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-commits/attachments/20161020/37af14fe/attachment.html>


More information about the llvm-commits mailing list