Skip to content

[runtimes] Share doxygen handling with LLVM#176948

Merged
Meinersbur merged 3 commits intollvm:mainfrom
Meinersbur:runtimes_doxygen
Jan 21, 2026
Merged

[runtimes] Share doxygen handling with LLVM#176948
Meinersbur merged 3 commits intollvm:mainfrom
Meinersbur:runtimes_doxygen

Conversation

@Meinersbur
Copy link
Member

@Meinersbur Meinersbur commented Jan 20, 2026

Hoist handling of Doxygen into the top-level cmake/ directory so it can be shared between LLVM and RUNTIMES so a default/standalone runtimes build can support building Doxygen documentation as well.

The openmp subproject currently supports doxygen documentation using an LLVM_ENABLE_PROJECTS=openmp build, but not with LLVM_ENABLE_RUNTIMES=openmp because of this missing boilerplate code in the runtimes build. This is a step towards removing the LLVM_ENABLE_PROJECTS=openmp build mode which was deprecated (#124014) and already scheduled to be removed in LLVM 21 (#136314). Eventual removal is planned with #176950.

Hoisting CMake code for shared use with runtimes has been done before in e.g. #84641, 7017e6c, 44e3365, 7017e6c

Share doxygen handling
@Meinersbur Meinersbur marked this pull request as ready for review January 21, 2026 01:13
@Meinersbur Meinersbur requested a review from a team as a code owner January 21, 2026 01:13
@llvmbot llvmbot added the cmake Build system in general and CMake in particular label Jan 21, 2026
Co-authored-by: Petr Hosek <phosek@google.com>
Copy link
Member

@petrhosek petrhosek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also a lot of duplicated (copy-pasted?) code to setup Doxygen for each subproject:

  • bolt/docs/CMakeLists.txt
  • clang-tools-extra/docs/CMakeLists.txt
  • clang/docs/CMakeLists.txt
  • flang/docs/CMakeLists.txt
  • llvm/docs/CMakeLists.txt
  • mlir/docs/CMakeLists.txt
  • openmp/docs/CMakeLists.txt
  • polly/docs/CMakeLists.txt

We should look into extracting that logic into a function in this module, but that can be done in follow up changes.

Co-authored-by: Petr Hosek <phosek@google.com>
@Meinersbur Meinersbur merged commit 50638e0 into llvm:main Jan 21, 2026
70 of 71 checks passed
@llvm-ci
Copy link

llvm-ci commented Jan 22, 2026

LLVM Buildbot has detected a new failure on builder sanitizer-ppc64le-linux running on ppc64le-sanitizer while building cmake,llvm,runtimes at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/17017

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/29/33 (2343 of 2879)
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/12/33 (2344 of 2879)
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/10/33 (2345 of 2879)
PASS: ThreadSanitizer-Unit :: rtl/./TsanRtlTest-powerpc64le-Test/32/37 (2346 of 2879)
PASS: SanitizerCommon-msan-powerpc64le-Linux :: Posix/realpath.cpp (2347 of 2879)
UNSUPPORTED: ThreadSanitizer-powerpc64le :: fiber_asm.cpp (2348 of 2879)
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/3/33 (2349 of 2879)
PASS: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64le-Test/321/345 (2350 of 2879)
PASS: SanitizerCommon-tsan-powerpc64le-Linux :: Linux/mprobe.cpp (2351 of 2879)
PASS: SanitizerCommon-tsan-powerpc64le-Linux :: sanitizer_coverage_control_flow.cpp (2352 of 2879)
FAIL: LeakSanitizer-Standalone-powerpc64le :: TestCases/create_thread_leak.cpp (2353 of 2879)
******************** TEST 'LeakSanitizer-Standalone-powerpc64le :: TestCases/create_thread_leak.cpp' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 3
/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang  --driver-mode=g++ -O0  -m64 -fno-function-sections  -gline-tables-only -fsanitize=leak -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/../ -pthread /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp
# executed command: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang --driver-mode=g++ -O0 -m64 -fno-function-sections -gline-tables-only -fsanitize=leak -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/../ -pthread /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp
# RUN: at line 4
not  /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 1 0 0 2>&1 | FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK123
# executed command: not /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 1 0 0
# executed command: FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK123
# RUN: at line 5
not  /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 1 0 2>&1 | FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
# executed command: not /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 1 0
# executed command: FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
# RUN: at line 6
not  /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 0 1 2>&1 | FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
# executed command: not /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 0 1
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
# `-----------------------------
# error: command failed with exit status: 2

--

********************
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/9/33 (2354 of 2879)
PASS: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64le-Test/52/345 (2355 of 2879)
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/24/33 (2356 of 2879)
PASS: ThreadSanitizer-Unit :: rtl/./TsanRtlTest-powerpc64le-Test/19/37 (2357 of 2879)
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/1/33 (2358 of 2879)
PASS: ThreadSanitizer-powerpc64le :: Linux/fork_syscall.cpp (2359 of 2879)
PASS: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64le-Test/42/345 (2360 of 2879)
Step 9 (test compiler-rt debug) failure: test compiler-rt debug (failure)
...
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/29/33 (2343 of 2879)
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/12/33 (2344 of 2879)
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/10/33 (2345 of 2879)
PASS: ThreadSanitizer-Unit :: rtl/./TsanRtlTest-powerpc64le-Test/32/37 (2346 of 2879)
PASS: SanitizerCommon-msan-powerpc64le-Linux :: Posix/realpath.cpp (2347 of 2879)
UNSUPPORTED: ThreadSanitizer-powerpc64le :: fiber_asm.cpp (2348 of 2879)
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/3/33 (2349 of 2879)
PASS: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64le-Test/321/345 (2350 of 2879)
PASS: SanitizerCommon-tsan-powerpc64le-Linux :: Linux/mprobe.cpp (2351 of 2879)
PASS: SanitizerCommon-tsan-powerpc64le-Linux :: sanitizer_coverage_control_flow.cpp (2352 of 2879)
FAIL: LeakSanitizer-Standalone-powerpc64le :: TestCases/create_thread_leak.cpp (2353 of 2879)
******************** TEST 'LeakSanitizer-Standalone-powerpc64le :: TestCases/create_thread_leak.cpp' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 3
/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang  --driver-mode=g++ -O0  -m64 -fno-function-sections  -gline-tables-only -fsanitize=leak -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/../ -pthread /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp
# executed command: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang --driver-mode=g++ -O0 -m64 -fno-function-sections -gline-tables-only -fsanitize=leak -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/../ -pthread /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp
# RUN: at line 4
not  /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 1 0 0 2>&1 | FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK123
# executed command: not /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 1 0 0
# executed command: FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK123
# RUN: at line 5
not  /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 1 0 2>&1 | FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
# executed command: not /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 1 0
# executed command: FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
# RUN: at line 6
not  /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 0 1 2>&1 | FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
# executed command: not /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 0 1
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
# `-----------------------------
# error: command failed with exit status: 2

--

********************
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/9/33 (2354 of 2879)
PASS: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64le-Test/52/345 (2355 of 2879)
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/24/33 (2356 of 2879)
PASS: ThreadSanitizer-Unit :: rtl/./TsanRtlTest-powerpc64le-Test/19/37 (2357 of 2879)
PASS: ThreadSanitizer-Unit :: unit/./TsanUnitTest-powerpc64le-Test/1/33 (2358 of 2879)
PASS: ThreadSanitizer-powerpc64le :: Linux/fork_syscall.cpp (2359 of 2879)
PASS: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64le-Test/42/345 (2360 of 2879)

Harrish92 pushed a commit to Harrish92/llvm-project that referenced this pull request Jan 23, 2026
Hoist handling of Doxygen into the top-level cmake/ directory so it can
be shared between LLVM and RUNTIMES and a default/standalone runtimes
build can support building Doxygen documentation as well.

The openmp subproject currently supports doxygen documentation using an
`LLVM_ENABLE_PROJECTS=openmp` build, but not with
`LLVM_ENABLE_RUNTIMES=openmp` because of this missing boilerplate code
in the runtimes build. This is a step towards removing the
`LLVM_ENABLE_PROJECTS=openmp` build mode which was deprecated (llvm#124014)
and already scheduled to be removed in LLVM 21 (llvm#136314). Eventual
removal is planned with llvm#176950.

Hoisting CMake code for shared use with runtimes has been done before in
e.g. llvm#84641, 7017e6c,
44e3365,
7017e6c

---------

Co-authored-by: Petr Hosek <phosek@google.com>
Harrish92 pushed a commit to Harrish92/llvm-project that referenced this pull request Jan 24, 2026
Hoist handling of Doxygen into the top-level cmake/ directory so it can
be shared between LLVM and RUNTIMES and a default/standalone runtimes
build can support building Doxygen documentation as well.

The openmp subproject currently supports doxygen documentation using an
`LLVM_ENABLE_PROJECTS=openmp` build, but not with
`LLVM_ENABLE_RUNTIMES=openmp` because of this missing boilerplate code
in the runtimes build. This is a step towards removing the
`LLVM_ENABLE_PROJECTS=openmp` build mode which was deprecated (llvm#124014)
and already scheduled to be removed in LLVM 21 (llvm#136314). Eventual
removal is planned with llvm#176950.

Hoisting CMake code for shared use with runtimes has been done before in
e.g. llvm#84641, 7017e6c,
44e3365,
7017e6c

---------

Co-authored-by: Petr Hosek <phosek@google.com>
@Meinersbur Meinersbur deleted the runtimes_doxygen branch January 27, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake Build system in general and CMake in particular

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants