diff --git a/buildbot/osuosl/master/config/builders.py b/buildbot/osuosl/master/config/builders.py --- a/buildbot/osuosl/master/config/builders.py +++ b/buildbot/osuosl/master/config/builders.py @@ -2468,6 +2468,27 @@ depends_on_projects=['llvm', 'bolt'], )}, + {'name': "bolt-x86_64-ubuntu-clang-bolt-lto-pgo", + 'tags': ["bolt"], + 'collapseRequests': False, + 'workernames':["bolt-worker"], + 'builddir': "bolt-x86_64-ubuntu-clang-bolt-lto-pgo", + 'factory' : BOLTBuilder.getBOLTCmakeBuildFactory( + bolttests=False, + depends_on_projects=['bolt', 'clang', 'lld', 'llvm'], + cache='clang/cmake/caches/BOLT-PGO.cmake', + targets=['stage2-clang++-bolt'], + extra_configure_args=[ + "-DLLVM_APPEND_VC_REV=OFF", + "-DLLVM_ENABLE_LLD=ON", + "-DBOOTSTRAP_LLVM_ENABLE_LLD=ON", + "-DBOOTSTRAP_BOOTSTRAP_LLVM_ENABLE_LLD=ON", + "-DLLVM_CCACHE_BUILD=ON", + "-DBOOTSTRAP_LLVM_CCACHE_BUILD=ON", + "-DPGO_INSTRUMENT_LTO=Thin", + ], + )}, + {'name': "bolt-x86_64-ubuntu-dylib", 'tags': ["bolt"], 'collapseRequests': False, diff --git a/zorg/buildbot/builders/BOLTBuilder.py b/zorg/buildbot/builders/BOLTBuilder.py --- a/zorg/buildbot/builders/BOLTBuilder.py +++ b/zorg/buildbot/builders/BOLTBuilder.py @@ -6,8 +6,12 @@ def getBOLTCmakeBuildFactory( clean = False, bolttests = False, + targets = None, + checks = None, + cache = None, extra_configure_args = None, env = None, + depends_on_projects = ['bolt', 'llvm'], **kwargs): if env is None: @@ -18,11 +22,13 @@ cleanBuildRequested = lambda step: clean or step.build.getProperty("clean", default=step.build.getProperty("clean_obj")) cleanBuildRequestedByProperty = lambda step: step.build.getProperty("clean") - checks = ['check-bolt'] - extra_steps = [] + if not targets: + targets = ['bolt'] + if not checks: + checks = ['check-bolt'] f = getLLVMBuildFactoryAndSourcecodeSteps( - depends_on_projects=['bolt', 'llvm'], + depends_on_projects=depends_on_projects, **kwargs) # Pass through all the extra arguments. if bolttests: @@ -53,6 +59,11 @@ ('-G', 'Ninja'), ]) + if cache: + CmakeCommand.applyRequiredOptions(extra_configure_args, [ + ("-C", f"../{f.monorepo_dir}/{cache}"), + ]) + addCmakeSteps( f, cleanBuildRequested=cleanBuildRequested, @@ -63,7 +74,7 @@ addNinjaSteps( f, - targets = ['bolt'], + targets=targets, checks=checks, env=env, **kwargs)