[lld][buildbot] Add more buildbots with sanitize/thread

Shankar Easwaran shankare at codeaurora.org
Tue Oct 29 11:07:32 PDT 2013


Hi Galina, Dmitri,

Attached is the patch which adds two new bots for compiling lld/clang 
with -fsanitize options

* address
* thread

Let me know if you could review and commit it.

Please let me know if llvm-reviews is the place to submit changes for 
buildbots too. I could move the diff over there if its convenient for you.

Thanks

Shankar Easwaran

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation

-------------- next part --------------
commit f6fe3d594923f2018e7c25a34a605fd947836d47
Author: Shankar Easwaran <shankare at codeaurora.org>
Date:   Tue Oct 29 12:48:50 2013 -0500

    [lld] add more buildbots with sanitize options

diff --git a/buildbot/osuosl/master/config/builders.py b/buildbot/osuosl/master/config/builders.py
index a2e095a..1065913 100644
--- a/buildbot/osuosl/master/config/builders.py
+++ b/buildbot/osuosl/master/config/builders.py
@@ -183,6 +183,17 @@ def _get_clang_fast_builders():
          'factory': ClangAndLLDBuilder.getClangAndLLDBuildFactory(
                     env={'PATH':'/home/llvmbb/bin/clang-latest/bin:/home/llvmbb/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'})},
 
+        {'name': "llvm-clang-lld-x86_64-ubuntu-13.04-sanitize-address",
+         'slavenames':["gribozavr2"],
+         'builddir':"llvm-clang-lld-x86_64-ubuntu-13.04-fsanitize-address",
+         'factory': ClangAndLLDBuilder.getClangAndLLDBuildFactory(Option='-fsanitize=address',
+                    env={'PATH':'/home/llvmbb/bin/clang-latest/bin:/home/llvmbb/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'})},
+
+        {'name': "llvm-clang-lld-x86_64-ubuntu-13.04-sanitize-thread",
+         'slavenames':["gribozavr2"],
+         'builddir':"llvm-clang-lld-x86_64-ubuntu-13.04-fsanitize-thread",
+         'factory': ClangAndLLDBuilder.getClangAndLLDBuildFactory(Option='-fsanitize=thread',
+                    env={'PATH':'/home/llvmbb/bin/clang-latest/bin:/home/llvmbb/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'})},
         ]
 
 # Clang builders.
@@ -794,7 +805,7 @@ LabPackageCache = 'http://10.1.1.2/packages/'
  'slavenames' :["lab-mini-03"],
  'builddir' :"clang-x86_64-darwin10-nt-O0-g",
  'factory' : LNTBuilder.getLNTFactory(triple='x86_64-apple-darwin10',
-                                      nt_flags=['--multisample=3', 
+                                      nt_flags=['--multisample=3',
                                                 '--optimize-option',
                                                 '-O0', '--cflag', '-g'],
                                       jobs=2,  use_pty_in_tests=True,
diff --git a/zorg/buildbot/builders/ClangAndLLDBuilder.py b/zorg/buildbot/builders/ClangAndLLDBuilder.py
index dd1704c..b251400 100644
--- a/zorg/buildbot/builders/ClangAndLLDBuilder.py
+++ b/zorg/buildbot/builders/ClangAndLLDBuilder.py
@@ -10,6 +10,7 @@ from zorg.buildbot.commands.LitTestCommand import LitTestCommand
 
 def getClangAndLLDBuildFactory(
            clean=True,
+           Option=None,
            env=None):
 
     llvm_srcdir = "llvm.src"
@@ -75,14 +76,21 @@ def getClangAndLLDBuildFactory(
                                description=["create build dir"],
                                workdir=".",
                                env=merged_env))
+
+    options = "-std=c++11 -Wdocumentation -Wno-documentation-deprecated-sync"
+
+    if (Option is not None):
+      options += Option
+
     cmakeCommand = [
         "cmake",
         "-DCMAKE_BUILD_TYPE=Release",
         "-DLLVM_ENABLE_ASSERTIONS=ON",
-        "-DCMAKE_CXX_FLAGS=\"-std=c++11 -Wdocumentation -Wno-documentation-deprecated-sync\"",
+        "-DCMAKE_CXX_FLAGS=\"%s\"",
         "-DLLVM_LIT_ARGS=\"-v\"",
         "-G", "Ninja",
-        "../%s" % llvm_srcdir]
+        "../%s" % (options, 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",


More information about the llvm-commits mailing list