[all-commits] [llvm/llvm-project] 846439: [Flang] Generate documentation for compiler flags
DylanFleming-arm via All-commits
all-commits at lists.llvm.org
Fri Jul 22 10:05:42 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 846439dd97d45e0e08af14269708511646a9add1
https://github.com/llvm/llvm-project/commit/846439dd97d45e0e08af14269708511646a9add1
Author: Dylan Fleming <Dylan.Fleming at arm.com>
Date: 2022-07-22 (Fri, 22 Jul 2022)
Changed paths:
M clang/utils/TableGen/ClangOptionDocEmitter.cpp
M flang/docs/CMakeLists.txt
M flang/docs/index.md
A flang/include/flang/FlangOptionsDocs.td
Log Message:
-----------
[Flang] Generate documentation for compiler flags
This patch aims to create a webpage to document
Flang's command line options on https://flang.llvm.org/docs/
in a similar way to Clang's
https://clang.llvm.org/docs/ClangCommandLineReference.html
This is done by using clang_tablegen to generate an .rst
file from Options.td (which is current shared with Clang)
For this to work, ClangOptionDocEmitter.cpp was updated
to allow specific Flang flags to be included,
rather than bulk excluding clang flags.
Note:
Some headings in the generated documentation will incorrectly
contain references to Clang, e.g.
"Flags controlling the behaviour of Clang during compilation"
This is because Options.td (Which is shared between both Clang and Flang)
contains hard-coded DocBrief sections. I couldn't find a non-intrusive way
to make this target-dependant, as such I've left this as is, and it will need revisiting later.
Reviewed By: awarzynski
Differential Revision: https://reviews.llvm.org/D129864
More information about the All-commits
mailing list