Skip to content

Commit c9fcbe4

Browse files
libc: use runtimes dir as base for cmake (#342)
Fixes: #325
1 parent fa37e02 commit c9fcbe4

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,13 @@ def main(argv):
6767
# explicit here, which reduces one step of setting environment
6868
# variables when setting up workers.
6969
cmake_args = ['-GNinja',
70-
'-DLLVM_ENABLE_RUNTIMES=libc',
7170
'-DCMAKE_C_COMPILER=%s' % cc,
7271
'-DCMAKE_CXX_COMPILER=%s' % cxx]
7372
if lint_build:
7473
cmake_args.append('-DLLVM_LIBC_CLANG_TIDY=%s' % clang_tidy)
7574

76-
projects = []
7775
if bootstrap_build:
78-
projects.append('clang')
76+
cmake_args.append('-DLLVM_ENABLE_PROJECTS=clang')
7977

8078
if args.debug:
8179
cmake_args.append('-DCMAKE_BUILD_TYPE=Debug')
@@ -85,11 +83,10 @@ def main(argv):
8583
if args.asan:
8684
cmake_args.append('-DLLVM_USE_SANITIZER=Address')
8785

86+
runtimes = ['libc']
8887
if fullbuild and not args.asan and not lint_build and not riscv_build:
89-
projects.extend(['clang', 'compiler-rt'])
90-
91-
if projects:
92-
cmake_args.append('-DLLVM_ENABLE_PROJECTS={}'.format(';'.join(projects)))
88+
runtimes.append('compiler-rt')
89+
cmakes_args.append(f"-DLLVM_ENABLE_PROJECTS={';'.join(runtimes)}")
9390

9491
if fullbuild and not args.asan and not lint_build and not riscv_build:
9592
cmake_args.append('-DLLVM_LIBC_INCLUDE_SCUDO=ON')
@@ -113,7 +110,11 @@ def main(argv):
113110
cmake_args.append('-DCMAKE_LINKER=/usr/bin/ld.lld')
114111
cmake_args.append('-DLLVM_LIBC_MPFR_INSTALL_PATH={}/gmp+mpfr/'.format(os.getenv('HOME')))
115112

116-
run_command(['cmake', os.path.join(source_dir, 'llvm')] + cmake_args)
113+
if bootstrap_build:
114+
cmake_root = 'llvm'
115+
else:
116+
cmake_root = 'runtimes'
117+
run_command(['cmake', os.path.join(source_dir, cmake_root)] + cmake_args)
117118

118119
if lint_build:
119120
with step('lint libc'):

0 commit comments

Comments
 (0)