Skip to content

Commit fa37e02

Browse files
libc: fix UnboundLocalError: local variable 'projects' referenced before assignment (#341)
Fixes: #325
1 parent 6deafd3 commit fa37e02

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

zorg/buildbot/builders/annotated/libc-linux.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ def main(argv):
7373
if lint_build:
7474
cmake_args.append('-DLLVM_LIBC_CLANG_TIDY=%s' % clang_tidy)
7575

76+
projects = []
7677
if bootstrap_build:
77-
projects = ['clang']
78+
projects.append('clang')
7879

7980
if args.debug:
8081
cmake_args.append('-DCMAKE_BUILD_TYPE=Debug')
@@ -87,7 +88,8 @@ def main(argv):
8788
if fullbuild and not args.asan and not lint_build and not riscv_build:
8889
projects.extend(['clang', 'compiler-rt'])
8990

90-
cmake_args.append('-DLLVM_ENABLE_PROJECTS={}'.format(';'.join(projects)))
91+
if projects:
92+
cmake_args.append('-DLLVM_ENABLE_PROJECTS={}'.format(';'.join(projects)))
9193

9294
if fullbuild and not args.asan and not lint_build and not riscv_build:
9395
cmake_args.append('-DLLVM_LIBC_INCLUDE_SCUDO=ON')

0 commit comments

Comments
 (0)