[flang-commits] [flang] [Flang] Add Sphinx man page and html support for Flang (PR #141882)

Paul Osmialowski via flang-commits flang-commits at lists.llvm.org
Wed Jun 4 09:48:27 PDT 2025


pawosm-arm wrote:

> > I'm trying to build it, but it fails, I presume due to warnings being treated as errors as I can't see any actual errors in the log. Does it build for you?:
> > ```
> > 
> > WARNING: multiple files found for the document "index": index.md, index.rst
> > ```
> 
> Are you building man or HTML?

This is a simple change I've added to the build script (I presume this is how it will be used by the others too):

```
    -DLLVM_BUILD_DOCS=ON
    -DLLVM_ENABLE_SPHINX=ON
```

This results in the following lines being generated in the `CMakeCache.txt` file:

```
//Generate build targets for the Flang docs.
FLANG_INCLUDE_DOCS:BOOL=ON

//HTML documentation install directory for flang
FLANG_INSTALL_SPHINX_HTML_DIR:STRING=share/doc/LLVM/flang/html

//Output standalone HTML files
SPHINX_OUTPUT_HTML:BOOL=ON

//Output man pages
SPHINX_OUTPUT_MAN:BOOL=ON

//When building documentation treat warnings as errors
SPHINX_WARNINGS_AS_ERRORS:BOOL=ON
```

>From this you can read I'm building both.


https://github.com/llvm/llvm-project/pull/141882


More information about the flang-commits mailing list