[llvm-commits] [zorg] r172329 - /zorg/trunk/zorg/buildbot/builders/ClangBuilder.py

David Blaikie dblaikie at gmail.com
Sat Jan 12 13:32:31 PST 2013


Author: dblaikie
Date: Sat Jan 12 15:32:31 2013
New Revision: 172329

URL: http://llvm.org/viewvc/llvm-project?rev=172329&view=rev
Log:
Don't reconfigure if we're doing a dirty build & there's already a Makefile

By not re-running configure we avoid trashing the Makefile cache which was
causing even non-clean builder configurations to rebuild all the LLVM/Clang
source anyway.

This brings my internal GDB 7.5 tester down to under 10 minutes (on an
zero-change incremental rebuild), down from 16 minutes. A little over a minute
of that is running the Clang+LLVM tests and rebuilding GDB. Those could
potentially be optimized as well (skipping the tests entirely, and applying the
same conditional configure to the GDB build).

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

Modified: zorg/trunk/zorg/buildbot/builders/ClangBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/ClangBuilder.py?rev=172329&r1=172328&r2=172329&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/ClangBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/ClangBuilder.py Sat Jan 12 15:32:31 2013
@@ -3,7 +3,7 @@
 import os
 
 from buildbot.process.properties import WithProperties
-from buildbot.steps.shell import Configure, ShellCommand
+from buildbot.steps.shell import Configure, ShellCommand, SetProperty
 from buildbot.steps.shell import WarningCountingShellCommand
 from buildbot.steps.source import SVN
 from buildbot.steps.transfer import FileDownload
@@ -160,11 +160,19 @@
     args = base_configure_args + ["--without-llvmgcc", "--without-llvmgxx"]
     args.append(WithProperties("--prefix=%%(builddir)s/%s" % llvm_1_installdir))
     args += getConfigArgs(stage1_config)
+    if not clean:
+        f.addStep(SetProperty(name="Makefile_isready",
+                              workdir=llvm_1_objdir,
+                              command=["sh", "-c",
+                                       "test -e Makefile && echo OK"],
+                              flunkOnFailure=False,
+                          property="exists_Makefile"))
     f.addStep(Configure(command=args,
                         workdir=llvm_1_objdir,
                         description=['configuring',stage1_config],
                         descriptionDone=['configure',stage1_config],
-                        env=merged_env))
+                        env=merged_env,
+                        doStepIf=lambda step: step.build.getProperty("exists_Makefile") != "OK"))
 
     # Make clean if using in-dir builds.
     if clean and llvm_srcdir == llvm_1_objdir:





More information about the llvm-commits mailing list