From 37dbc82a5a6079cbc69b6649cb280346cce89d4e Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Thu, 12 Dec 2024 13:03:22 -0800 Subject: [PATCH] libc: fix UnboundLocalError: local variable 'projects' referenced before assignment Fixes: #325 --- zorg/buildbot/builders/annotated/libc-linux.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zorg/buildbot/builders/annotated/libc-linux.py b/zorg/buildbot/builders/annotated/libc-linux.py index 7d49051b..68e034da 100644 --- a/zorg/buildbot/builders/annotated/libc-linux.py +++ b/zorg/buildbot/builders/annotated/libc-linux.py @@ -73,8 +73,9 @@ def main(argv): if lint_build: cmake_args.append('-DLLVM_LIBC_CLANG_TIDY=%s' % clang_tidy) + projects = [] if bootstrap_build: - projects = ['clang'] + projects.append('clang') if args.debug: cmake_args.append('-DCMAKE_BUILD_TYPE=Debug') @@ -87,7 +88,8 @@ def main(argv): if fullbuild and not args.asan and not lint_build and not riscv_build: projects.extend(['clang', 'compiler-rt']) - cmake_args.append('-DLLVM_ENABLE_PROJECTS={}'.format(';'.join(projects))) + if projects: + cmake_args.append('-DLLVM_ENABLE_PROJECTS={}'.format(';'.join(projects))) if fullbuild and not args.asan and not lint_build and not riscv_build: cmake_args.append('-DLLVM_LIBC_INCLUDE_SCUDO=ON')