From 7349140621935010abac80efb6a56266084fcded Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Thu, 12 Dec 2024 13:44:58 -0800 Subject: [PATCH 1/2] libc: use runtimes dir as base for cmake Fixes: #325 --- zorg/buildbot/builders/annotated/libc-linux.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zorg/buildbot/builders/annotated/libc-linux.py b/zorg/buildbot/builders/annotated/libc-linux.py index 68e034da..412affef 100644 --- a/zorg/buildbot/builders/annotated/libc-linux.py +++ b/zorg/buildbot/builders/annotated/libc-linux.py @@ -113,7 +113,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'): From 171a4a17f6531b80cb307f1eab75f50cdf00bbc8 Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Thu, 12 Dec 2024 13:54:22 -0800 Subject: [PATCH 2/2] move compiler-rt to runtimes --- zorg/buildbot/builders/annotated/libc-linux.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/zorg/buildbot/builders/annotated/libc-linux.py b/zorg/buildbot/builders/annotated/libc-linux.py index 412affef..1385e8f5 100644 --- a/zorg/buildbot/builders/annotated/libc-linux.py +++ b/zorg/buildbot/builders/annotated/libc-linux.py @@ -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') @@ -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')