diff --git a/zorg/buildbot/builders/annotated/bolt-nfc.py b/zorg/buildbot/builders/annotated/bolt-nfc.py --- a/zorg/buildbot/builders/annotated/bolt-nfc.py +++ b/zorg/buildbot/builders/annotated/bolt-nfc.py @@ -6,11 +6,30 @@ import traceback import util from contextlib import contextmanager +import annotated_builder -def main(): +def main(argv): + ap = annotated_builder.get_argument_parser() + args = ap.parse_args(argv[1:]) source_dir = os.path.join('..', 'llvm-project') tests_dir = os.path.join('..', 'bolt-tests') + projects = ['llvm', 'clang', 'lld', 'bolt'] + extra_cmake_args = [ + '-DCMAKE_BUILD_TYPE=Release', + '-DLLVM_APPEND_VC_REV=OFF', + '-DLLVM_CCACHE_BUILD=ON', + '-DLLVM_ENABLE_ASSERTIONS=ON', + '-DLLVM_ENABLE_LLD=ON', + '-DLLVM_TARGETS_TO_BUILD=X86;AArch64', + '-DLLVM_EXTERNAL_PROJECTS=bolttests', + '-DLLVM_EXTERNAL_BOLTTESTS_SOURCE_DIR='+tests_dir, + ] + check_targets = [ + 'check-bolt', + 'check-large-bolt', + ] + with step('fetch large-bolt-tests'): if os.path.exists(tests_dir): run_command(['git', '-C', tests_dir, 'fetch', 'origin']) @@ -21,30 +40,11 @@ 'https://github.com/rafaelauler/bolt-tests', tests_dir]) - with step('cmake'): - cmake_args = ['-GNinja', - '-DCMAKE_BUILD_TYPE=Release', - '-DLLVM_APPEND_VC_REV=OFF', - '-DLLVM_CCACHE_BUILD=ON', - '-DLLVM_ENABLE_ASSERTIONS=ON', - '-DLLVM_ENABLE_LLD=ON', - '-DLLVM_ENABLE_PROJECTS=clang;lld;bolt', - '-DLLVM_TARGETS_TO_BUILD=X86;AArch64', - '-DLLVM_EXTERNAL_PROJECTS=bolttests', - '-DLLVM_EXTERNAL_BOLTTESTS_SOURCE_DIR='+tests_dir, - ] - - util.clean_dir('.') - run_command(['cmake', os.path.join(source_dir, 'llvm')] + cmake_args) - - with step('build bolt'): - run_command(['ninja', 'bolt']) - - with step('check-bolt'): - run_command(['ninja', 'check-bolt']) - - with step('check-large-bolt'): - run_command(['ninja', 'check-large-bolt']) + builder = annotated_builder.AnnotatedBuilder() + builder.run_steps(projects=projects, + extra_cmake_args=extra_cmake_args, + check_targets=check_targets, + jobs=args.jobs) with step('nfc-check-setup'): run_command([os.path.join(source_dir, 'bolt', 'utils', @@ -54,6 +54,8 @@ run_command([os.path.join('bin', 'llvm-lit'), '-sv', '-j2', # bolt-info will always mismatch in NFC mode '--xfail=bolt-info.test', + # FIXME[aaupov]: https://github.com/llvm/llvm-project/issues/59008 + '--filter-out=X86/bb-with-two-tail-calls.s', 'tools/bolt/test']) with step('nfc-check-large-bolt', warn_on_fail=True, halt_on_fail=False):