[zorg] r375141 - Updated UnifiedTreeBuilder to fully support is_legacy_mode.
Galina Kistanova via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 17 10:38:12 PDT 2019
Author: gkistanova
Date: Thu Oct 17 10:38:12 2019
New Revision: 375141
URL: http://llvm.org/viewvc/llvm-project?rev=375141&view=rev
Log:
Updated UnifiedTreeBuilder to fully support is_legacy_mode.
This allows to use the newly added LLVMBuildFactory ability to transparently use SVN or github and switch between depending on the is_legacy_mode attribute, and adds a github support to UnifiedTreeBuilder.
Patch by Andrei Lebedev
Differential Revision: https://reviews.llvm.org/D69049
Modified:
zorg/trunk/zorg/buildbot/builders/UnifiedTreeBuilder.py
Modified: zorg/trunk/zorg/buildbot/builders/UnifiedTreeBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/UnifiedTreeBuilder.py?rev=375141&r1=375140&r2=375141&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/UnifiedTreeBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/UnifiedTreeBuilder.py Thu Oct 17 10:38:12 2019
@@ -26,7 +26,11 @@ def getLLVMBuildFactoryAndPrepareForSour
# We want a clean checkout only if requested by the property.
cleanBuildRequested = cleanBuildRequestedByProperty
+ # By default UnifiedTreeBuilder works in the legacy mode yet.
+ is_legacy_mode = kwargs.pop('is_legacy_mode', True)
+
f = LLVMBuildFactory(
+ is_legacy_mode=is_legacy_mode,
depends_on_projects=depends_on_projects,
llvm_srcdir=llvm_srcdir,
obj_dir=obj_dir,
@@ -38,7 +42,7 @@ def getLLVMBuildFactoryAndPrepareForSour
# TODO: Some Windows slaves do not handle RemoveDirectory command well.
# So, consider running "rmdir /S /Q <dir>" if the build runs on Windows.
f.addStep(RemoveDirectory(name='clean-src-dir',
- dir=f.llvm_srcdir,
+ dir=f.llvm_srcdir if f.is_legacy_mode else f.monorepo_dir,
haltOnFailure=False,
flunkOnFailure=False,
doStepIf=cleanBuildRequestedByProperty,
@@ -52,7 +56,6 @@ def getLLVMBuildFactoryAndSourcecodeStep
obj_dir = None,
install_dir = None,
cleanBuildRequested = None,
- env = None,
**kwargs):
f = getLLVMBuildFactoryAndPrepareForSourcecodeSteps(
@@ -84,6 +87,10 @@ def addCmakeSteps(
stage_name = None,
**kwargs):
+ # Consume is_legacy_mode if given.
+ # TODO: Remove this once legacy mode gets dropped.
+ kwargs.pop('is_legacy_mode', None)
+
# Make a local copy of the configure args, as we are going to modify that.
if extra_configure_args:
cmake_args = extra_configure_args[:]
@@ -104,6 +111,11 @@ def addCmakeSteps(
doStepIf=cleanBuildRequested,
))
+ if not f.is_legacy_mode:
+ CmakeCommand.applyRequiredOptions(cmake_args, [
+ ('-DLLVM_ENABLE_PROJECTS=', ";".join(f.depends_on_projects)),
+ ])
+
if install_dir:
install_dir_rel = LLVMBuildFactory.pathRelativeToBuild(
install_dir,
@@ -157,6 +169,10 @@ def addNinjaSteps(
stage_name = None,
**kwargs):
+ # Consume is_legacy_mode if given.
+ # TODO: Remove this once legacy mode gets dropped.
+ kwargs.pop('is_legacy_mode', None)
+
# Build the unified tree.
if stage_name:
step_name = "%s-" % stage_name
More information about the llvm-commits
mailing list