[zorg] r183169 - Add support for using '-flto' for phased LNT builders.

David Dean david_dean at apple.com
Mon Jun 3 16:25:29 PDT 2013


Author: ddean
Date: Mon Jun  3 18:25:29 2013
New Revision: 183169

URL: http://llvm.org/viewvc/llvm-project?rev=183169&view=rev
Log:
Add support for using '-flto' for phased LNT builders.

Modified:
    zorg/trunk/zorg/buildbot/builders/LNTBuilder.py

Modified: zorg/trunk/zorg/buildbot/builders/LNTBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/LNTBuilder.py?rev=183169&r1=183168&r2=183169&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/LNTBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/LNTBuilder.py Mon Jun  3 18:25:29 2013
@@ -29,6 +29,14 @@ def _get_cxx(status, stdin, stdout):
             return { 'cxx_path' : cxx_path }
     return {}
 
+def _get_liblto(status, stdin, stdout):
+    lines = filter(bool, stdin.split('\n'))
+    for line in lines:
+        if 'lib/libLTO.dylib' in line:
+            lto_path = line
+            return { 'lto_path' : lto_path }
+    return {}
+
 def getLNTFactory(triple, nt_flags, xfails=[], clean=True, test=False,
                   **kwargs):
     lnt_args = {}
@@ -201,5 +209,13 @@ def CreateLNTNightlyFactory(nt_flags, cc
                   extract_fn=_get_db_url,
                   workdir=WithProperties('%(builddir)s')))
         args.extend(['--submit', WithProperties('%(db_url)s')])
+    # Add --liblto-path if necessary.
+    if '-flto' in nt_flags:
+        f.addStep(buildbot.steps.shell.SetProperty(
+                  name='find.liblto',
+                  command=['find', 'host-compiler', '-name', 'libLTO.dylib'],
+                  extract_fn=_get_liblto,
+                  workdir=WithProperties('%(builddir)s')))
+        nt_flags.extend(['--liblto-path', WithProperties('%(builddir)s/%(lto_path)s')])
 
     return f





More information about the llvm-commits mailing list