Manual-sync mirror of chromium.googlesource.com/external/github.com/llvm/llvm-project (bare monorepo, no subtree suffix)
Find a file
Scott Linder 42ff45b865
[docs] Create utils/docs (#203962)
llvm-project is home to many sphinx documentation sites, each with
configuration quirks and bespoke extensions.

The sphinx config model makes sharing code somewhat difficult. There
are options like sphinx-multiproject, but some of our docs builds are
out of the source tree while some are done out of the binary tree, so
the multiproject configuration itself would need to be generated. It
also would impose more uniformity around extensions than required.

This change instead creates a python package at utils/docs/llvm_sphinx
and makes it available to all sphinx-build processes via PYTHONPATH.
Each conf.py does not modify its own sys.path because not all builds are
out of the source tree, so there isn't a stable relative path to use to
refer to the utils/docs/ directory.

Type checking via pyright in new package is pinned to being python 3.8
compatible.

The myst slug script from llvm/docs is promoted to be the default,
with a slight edit to targets needed in FlangDriver.md to adapt to the
change.

The ghlinks extension from clang gets lifted to be the first generic
extension, although it is still only used in clang currently. I used it
as an example of a general extension that might be useful for other
projects, but I also intend to add a new generic extension in a future
patch.

As part of the move ghlinks is refactored a bit:

* Rather than have a main function directly to run its tests, those
  tests are now run via the command-line entrypoint to the new package,
  e.g. `python utils/docs --test` will now replace
  `python clang/docs/ghlinks.py --test`. This makes the command-line
  more pithy (`python utils/docs/llvm_sphinx/ext/ghlinks --test` is a
  bit long), and makes the default behavior when running be to
  include utils/docs in the sys.path, so imports can be absolute and
  the behavior is as close to the CMake targets as possible.
* The static files that were previously written to a tempdir during
  testing are just committed directly in git. The assumption here is
  that the original version was taking pains to avoid polluting the
  clang/docs directory with test files that would confuse sphinx-build,
  and without that limitation the workaround can be removed.
* Some typing-related changes to make it strictly python 3.8 compatible.

Change-Id: Ie16de273f74973f163dbf7fe9d22d80a466d051f
2026-06-24 15:12:48 -04:00
.ci [CI] switch to BuildTools variant of Visual Studio (#201335) 2026-06-23 12:31:22 +01:00
.github [Github] Bump release-binaries python version (#179287) 2026-06-23 19:27:38 -07:00
bolt [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
clang [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
clang-tools-extra [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
cmake Revert "runtimes: Pass CMAKE_SYSTEM_NAME based on target triple" (#205133) 2026-06-22 18:30:29 +02:00
compiler-rt [tysan] Guard mallopt() use on SANITIZER_GLIBC instead of SANITIZER_LINUX (#203118) 2026-06-24 19:04:49 +00:00
cross-project-tests [Dexter] Add ability to rewrite scripts to fill-in unknown values (#202799) 2026-06-24 16:55:25 +01:00
flang [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
flang-rt [flang-rt][openmp] Add file-level dependencies for builtin mod files (#204260) 2026-06-22 18:12:37 +02:00
libc [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
libclc [libclc] Use unchecked division for f64 AMDGPU reciprocal (#203809) 2026-06-15 07:26:32 -05:00
libcxx [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
libcxxabi [Demangle] Guard DEMANGLE_ABI and add missing annotation (#202920) 2026-06-11 02:48:04 -07:00
libsycl [libsycl] add heuristics to prefer devices with compatible images (#203530) 2026-06-24 09:39:13 -07:00
libunwind [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
lld [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
lldb [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
llvm [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
llvm-libgcc [Runtimes] Introduce variables containing resource dir paths (#177953) 2026-04-02 10:32:14 +00:00
mlir [mlir][emitc]: use converted result types when func.call has one result (#205191) 2026-06-24 11:16:09 -07:00
offload [offload] add support for aligned allocations (#203353) 2026-06-24 19:19:33 +02:00
openmp [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
orc-rt [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
polly [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
runtimes Revert "runtimes: Pass CMAKE_SYSTEM_NAME based on target triple" (#205133) 2026-06-22 18:30:29 +02:00
third-party Fix a warning and an uninitialized variable in benchmark (#200927) 2026-06-02 13:49:06 -07:00
utils [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
.clang-format
.clang-format-ignore [Docs] Update coding standard for TD files (#200848) 2026-06-01 21:35:58 +01:00
.clang-tidy Add default empty header filter regex to root .clang-tidy (#167386) 2025-11-11 01:36:25 +03:00
.git-blame-ignore-revs Add "Split clang/lib/CodeGen/CGBuiltin.cpp" to .git-blame-ignore-revs (#203419) 2026-06-12 12:03:28 +01:00
.gitattributes [libclang/python] Enable packaging clang python bindings (#125806) 2025-11-24 17:21:24 -08:00
.gitignore gitignore: Add emacs lock files (#205055) 2026-06-22 18:19:29 +02:00
.mailmap [mailmap] Add mailmap entry for myself (#189447) 2026-03-30 18:35:34 +00:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE.TXT
pyproject.toml [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
README.md
SECURITY.md [SECURITY.md] add pointers to "what is a security issue" (#177372) 2026-01-22 17:19:09 -07:00

The LLVM Compiler Infrastructure

OpenSSF Scorecard OpenSSF Best Practices libc++

Welcome to the LLVM project!

This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.

The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.

C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.

Other components include: the libc++ C++ standard library, the LLD linker, and more.

Getting the Source Code and Building LLVM

Consult the Getting Started with LLVM page for information on building and running LLVM.

For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.

Getting in touch

Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.

The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.