[llvm-dev] Question for Sphinx experts

James Henderson via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 27 02:10:55 PST 2021


https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html?highlight=..%20option#directive-program
might be what you are looking for. You probably need multiple program
directives (llvm-tblgen, mlir-tblgen etc), since it sounds to me like you
are dealing with multiple different (albeit related) programs, since the
same program can't have two identically-named but different options.

On Tue, 26 Jan 2021 at 15:25, Paul C. Anagnostopoulos <paul at windfall.com>
wrote:

> The file has a '.. program:: tblgen' at the top. I think the issue is that
> there are two identical '.. option' names in the same file. Apparently each
> option generates a target name, two of which are the same.
>
> Does anyone know where to find the documentation on the '.. option'
> directive? I just exceeded by 10-minute limit on searching the interwebs.
>
> At 1/26/2021 03:24 AM, James Henderson wrote:
> >I think you need to scope the doc - there are similar issues in various
> of the LLVM binutils tools. For example, both the llvm-readelf and
> llvm-objdump docs describe the `--file-headers` options. The scoping you
> need (I think) is the line at the top of these docs that looks something
> like `.. program:: llvm-objdump`. Indeed, without that scoping, you can
> potentially end up with docs linking to options described on other pages,
> which is almost certainly not what you want.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210127/29a34530/attachment.html>


More information about the llvm-dev mailing list