[zorg] r195058 - Based on the patch proposed by Rick Foos!

Galina Kistanova gkistanova at gmail.com
Mon Nov 18 15:57:02 PST 2013


Author: gkistanova
Date: Mon Nov 18 17:57:02 2013
New Revision: 195058

URL: http://llvm.org/viewvc/llvm-project?rev=195058&view=rev
Log:
Based on the patch proposed by Rick Foos!
Added a new buildslave, hexagon-build-03, and a few modifications stabilize the sanitizer on the server.

Modified:
    zorg/trunk/buildbot/osuosl/master/config/builders.py
    zorg/trunk/buildbot/osuosl/master/config/slaves.py
    zorg/trunk/zorg/buildbot/builders/ClangAndLLDBuilder.py

Modified: zorg/trunk/buildbot/osuosl/master/config/builders.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/config/builders.py?rev=195058&r1=195057&r2=195058&view=diff
==============================================================================
--- zorg/trunk/buildbot/osuosl/master/config/builders.py (original)
+++ zorg/trunk/buildbot/osuosl/master/config/builders.py Mon Nov 18 17:57:02 2013
@@ -623,6 +623,14 @@ def _get_sanitizer_builders():
            'slavenames' :["sanitizer-buildbot2"],
            'builddir': "sanitizer-x86_64-linux-bootstrap",
            'factory': SanitizerBuilder.getSanitizerBuildFactory()},
+
+          # hexagon-build-03: /opt/usr/bin contains clang-3.4 for sanitizer.
+          {'name': "llvm-clang-lld-x86_64-ubuntu-13.04-sanitize-address",
+           'slavenames':["hexagon-build-03"],
+           'builddir':"llvm-clang-lld-x86_64-ubuntu-13.04-fsanitize-address",
+           'factory': ClangAndLLDBuilder.getClangAndLLDBuildFactory(
+                                             buildWithSanitizerOptions=['-fsanitize=address'],
+                                             env={'PATH':'/opt/usr/bin:/usr/local/bin:/usr/bin:/bin'})},
           ]
 
 # Experimental and stopped builders

Modified: zorg/trunk/buildbot/osuosl/master/config/slaves.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/config/slaves.py?rev=195058&r1=195057&r2=195058&view=diff
==============================================================================
--- zorg/trunk/buildbot/osuosl/master/config/slaves.py (original)
+++ zorg/trunk/buildbot/osuosl/master/config/slaves.py Mon Nov 18 17:57:02 2013
@@ -188,7 +188,12 @@ def get_build_slaves():
         create_slave("osu8", properties={'jobs' : 6}, max_builds=2),
 
         # Ubuntu 12.04 x86-64, Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
-        create_slave("hexagon-build-02", properties={'jobs': 12}, max_builds=4),
+        create_slave("hexagon-build-02", properties={'jobs': 12, 'loadaverage': 32},
+            max_builds=4),
+        # Ubuntu 13.04 x86-64, Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
+        # hexagon-build-03: /opt/usr/bin contains clang-3.4 for sanitizer.
+        create_slave("hexagon-build-03", properties={'jobs': 16, 'loadaverage': 32},
+            max_builds=2),
 
         # Cavium Octeon II V0.8, MIPS64 big endian, Debian squeeze (6.0.6)
         create_slave("mipsswbrd002", properties={'jobs' : 6}, max_builds=1),

Modified: zorg/trunk/zorg/buildbot/builders/ClangAndLLDBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/ClangAndLLDBuilder.py?rev=195058&r1=195057&r2=195058&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/ClangAndLLDBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/ClangAndLLDBuilder.py Mon Nov 18 17:57:02 2013
@@ -2,15 +2,16 @@ import os
 
 import buildbot
 import buildbot.process.factory
-from buildbot.steps.source import SVN, Git
-from buildbot.steps.shell import Configure, ShellCommand
+from buildbot.steps.source import SVN
+from buildbot.steps.shell import ShellCommand
 from buildbot.steps.shell import WarningCountingShellCommand
 from buildbot.process.properties import WithProperties
 from zorg.buildbot.commands.LitTestCommand import LitTestCommand
 
 def getClangAndLLDBuildFactory(
            clean=True,
-           env=None):
+           env=None,
+           buildWithSanitizerOptions=None):
 
     llvm_srcdir = "llvm.src"
     llvm_objdir = "llvm.obj"
@@ -38,11 +39,15 @@ def getClangAndLLDBuildFactory(
                   baseURL='http://llvm.org/svn/llvm-project/llvm/',
                   defaultBranch='trunk',
                   workdir=llvm_srcdir))
-    f.addStep(SVN(name='svn-compiler-rt',
-                  mode='update',
-                  baseURL='http://llvm.org/svn/llvm-project/compiler-rt/',
-                  defaultBranch='trunk',
-                  workdir='%s/projects/compiler-rt' % llvm_srcdir))
+
+    # Sanitizer runtime in compiler-rt, and cannot be built with sanitizer compiler.
+    if buildWithSanitizerOptions is None:
+        f.addStep(SVN(name='svn-compiler-rt',
+                      mode='update',
+                      baseURL='http://llvm.org/svn/llvm-project/compiler-rt/',
+                      defaultBranch='trunk',
+                      workdir='%s/projects/compiler-rt' % llvm_srcdir))
+
     f.addStep(SVN(name='svn-clang',
                   mode='update',
                   baseURL='http://llvm.org/svn/llvm-project/cfe/',
@@ -71,18 +76,27 @@ def getClangAndLLDBuildFactory(
     # Create configuration files with cmake.
     f.addStep(ShellCommand(name="create-build-dir",
                                command=["mkdir", "-p", llvm_objdir],
-                               haltOnFailure=False,
+                               haltOnFailure=True,
                                description=["create build dir"],
                                workdir=".",
                                env=merged_env))
+
+    options = ["-std=c++11", "-Wdocumentation", "-Wno-documentation-deprecated-sync"]
+
+    if buildWithSanitizerOptions:
+        options += buildWithSanitizerOptions
+
     cmakeCommand = [
         "cmake",
         "-DCMAKE_BUILD_TYPE=Release",
         "-DLLVM_ENABLE_ASSERTIONS=ON",
-        "-DCMAKE_CXX_FLAGS=\"-std=c++11 -Wdocumentation -Wno-documentation-deprecated-sync\"",
+        "-DCMAKE_C_COMPILER=clang",
+        "-DCMAKE_CXX_COMPILER=clang++",
+        "-DCMAKE_CXX_FLAGS=\"%s\"" % (" ".join(options)),
         "-DLLVM_LIT_ARGS=\"-v\"",
         "-G", "Ninja",
         "../%s" % llvm_srcdir]
+
     # Note: ShellCommand does not pass the params with special symbols right.
     # The " ".join is a workaround for this bug.
     f.addStep(ShellCommand(name="cmake-configure",
@@ -92,9 +106,15 @@ def getClangAndLLDBuildFactory(
                                workdir=llvm_objdir,
                                env=merged_env))
 
+    ninjaCommand = [
+        "nice", "-n", "10",
+        "ninja",
+             WithProperties("%(jobs:+-j)s"),        WithProperties("%(jobs:-)s"),
+             WithProperties("%(loadaverage:+-l)s"), WithProperties("%(loadaverage:-)s")]
+
     # Build everything.
     f.addStep(WarningCountingShellCommand(name="build",
-                                          command=["nice", "-n", "10", "ninja"],
+                                          command=ninjaCommand,
                                           haltOnFailure=True,
                                           description=["build"],
                                           workdir=llvm_objdir,
@@ -102,7 +122,7 @@ def getClangAndLLDBuildFactory(
 
     # Test everything.
     f.addStep(LitTestCommand(name="test",
-                             command=["nice", "-n", "10", "ninja", "check-all"],
+                             command=ninjaCommand,
                              haltOnFailure=True,
                              description=["test"],
                              workdir=llvm_objdir,





More information about the llvm-commits mailing list