Page MenuHomePhabricator

D69049.diff
No OneTemporary

File Metadata

Created
Sun, Dec 15, 6:38 PM

D69049.diff

Index: zorg/buildbot/builders/UnifiedTreeBuilder.py
===================================================================
--- zorg/buildbot/builders/UnifiedTreeBuilder.py
+++ zorg/buildbot/builders/UnifiedTreeBuilder.py
@@ -26,7 +26,11 @@
# 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 @@
# 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 @@
obj_dir = None,
install_dir = None,
cleanBuildRequested = None,
- env = None,
**kwargs):
f = getLLVMBuildFactoryAndPrepareForSourcecodeSteps(
@@ -84,6 +87,10 @@
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 @@
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 @@
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

Event Timeline