[flang-commits] [flang] [Flang] Add Sphinx man page and html support for Flang (PR #141882)
Samarth Narang via flang-commits
flang-commits at lists.llvm.org
Wed Jun 4 09:54:01 PDT 2025
snarang181 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.
So I have both enabled too according to my local `CMakeCache.txt` and I am able to build both targets. This error was seen before, just as a sanity check, do you have a clean build?
https://github.com/llvm/llvm-project/pull/141882
More information about the flang-commits
mailing list