Skip to content

Commit

Permalink
libc: use runtimes dir as base for cmake (#342)
Browse files Browse the repository at this point in the history
Fixes: #325
  • Loading branch information
nickdesaulniers authored Dec 12, 2024
1 parent fa37e02 commit c9fcbe4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions zorg/buildbot/builders/annotated/libc-linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,13 @@ def main(argv):
# explicit here, which reduces one step of setting environment
# variables when setting up workers.
cmake_args = ['-GNinja',
'-DLLVM_ENABLE_RUNTIMES=libc',
'-DCMAKE_C_COMPILER=%s' % cc,
'-DCMAKE_CXX_COMPILER=%s' % cxx]
if lint_build:
cmake_args.append('-DLLVM_LIBC_CLANG_TIDY=%s' % clang_tidy)

projects = []
if bootstrap_build:
projects.append('clang')
cmake_args.append('-DLLVM_ENABLE_PROJECTS=clang')

if args.debug:
cmake_args.append('-DCMAKE_BUILD_TYPE=Debug')
Expand All @@ -85,11 +83,10 @@ def main(argv):
if args.asan:
cmake_args.append('-DLLVM_USE_SANITIZER=Address')

runtimes = ['libc']
if fullbuild and not args.asan and not lint_build and not riscv_build:
projects.extend(['clang', 'compiler-rt'])

if projects:
cmake_args.append('-DLLVM_ENABLE_PROJECTS={}'.format(';'.join(projects)))
runtimes.append('compiler-rt')
cmakes_args.append(f"-DLLVM_ENABLE_PROJECTS={';'.join(runtimes)}")

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

run_command(['cmake', os.path.join(source_dir, 'llvm')] + cmake_args)
if bootstrap_build:
cmake_root = 'llvm'
else:
cmake_root = 'runtimes'
run_command(['cmake', os.path.join(source_dir, cmake_root)] + cmake_args)

if lint_build:
with step('lint libc'):
Expand Down

0 comments on commit c9fcbe4

Please sign in to comment.