[Lldb-commits] [PATCH] D69555: [zorg] Fix LLDBCmakeBuildFactory
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 29 03:19:04 PDT 2019
labath created this revision.
labath added reviewers: jankratochvil, stella.stamenova, gkistanova.
The attempt in D69341 <https://reviews.llvm.org/D69341> was not complete, as in the monorepo world, we
also need to pass LLVM_ENABLE_PROJECTS in order to build lldb (and
clang and lld).
This also updates the code to use the CmakeCommand class instead of the
generic ShellCommand.
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
@@ -11,6 +11,7 @@
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.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.226865.patch
Type: text/x-patch
Size: 2393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191029/b8967234/attachment.bin>
More information about the lldb-commits
mailing list