[Lldb-commits] [PATCH] D69555: [zorg] Fix LLDBCmakeBuildFactory

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 30 05:18:35 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rZORGa342b84f8576: [zorg] Fix LLDBCmakeBuildFactory (authored by labath).

Repository:
  rZORG LLVM Github Zorg

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69555/new/

https://reviews.llvm.org/D69555

Files:
  zorg/buildbot/builders/LLDBBuilder.py


Index: zorg/buildbot/builders/LLDBBuilder.py
===================================================================
--- zorg/buildbot/builders/LLDBBuilder.py
+++ zorg/buildbot/builders/LLDBBuilder.py
@@ -9,8 +9,9 @@
 from buildbot.steps.slave import RemoveDirectory
 from buildbot.process.properties import WithProperties, Property
 from buildbot.steps import trigger
-import zorg.buildbot.commands.BatchFileDownload as batch_file_download
 from zorg.buildbot.commands.LitTestCommand import LitTestCommand
+from zorg.buildbot.commands.CmakeCommand import CmakeCommand
+from zorg.buildbot.conditions.FileConditions import FileDoesNotExist
 from zorg.buildbot.builders.Util import getVisualStudioEnvironment
 from zorg.buildbot.builders.Util import extractSlaveEnvironment
 from zorg.buildbot.process.factory import LLVMBuildFactory
@@ -106,24 +107,27 @@
                 doStepIf=cleanBuildRequested
                 ))
 
-    cmake_cmd = [
-        "cmake", "-G", "Ninja", os.path.join(os.pardir, f.monorepo_dir, "llvm"),
+    path = os.path.join(os.pardir, f.monorepo_dir, "llvm")
+    cmake_options = [
+        "-G", "Ninja",
         "-DCMAKE_BUILD_TYPE=" + config,
-        "-DCMAKE_INSTALL_PREFIX=../install"
+        "-DCMAKE_INSTALL_PREFIX=../install",
+        "-DLLVM_ENABLE_PROJECTS=" + ";".join(f.depends_on_projects),
         ]
     if python_source_dir:
-        cmake_cmd.append("-DPYTHON_HOME=" + python_source_dir)
+        cmake_options.append("-DPYTHON_HOME=" + python_source_dir)
     if extra_cmake_args:
-        cmake_cmd += extra_cmake_args
-    # 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",
+        cmake_options += extra_cmake_args
+
+    f.addStep(CmakeCommand(name="cmake-configure",
                            description=["cmake configure"],
-                           command=WithProperties(" ".join(cmake_cmd)),
                            haltOnFailure=True,
-                           warnOnWarnings=True,
+                           options=cmake_options,
+                           path="../%s" % f.llvm_srcdir,
+                           env=Property('slave_env'),
                            workdir=build_dir,
-                           env=Property('slave_env')))
+                           doStepIf=FileDoesNotExist(
+                                        "./%s/CMakeCache.txt" % build_dir)))
 
     f.addStep(WarningCountingShellCommand(name='build',
                           command=build_cmd,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69555.227068.patch
Type: text/x-patch
Size: 2577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191030/53e03f12/attachment.bin>


More information about the lldb-commits mailing list