-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[Flang] Add Sphinx man page and html support for Flang #141882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Flang] Add Sphinx man page and html support for Flang #141882
Conversation
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
@pawosm-arm -- Sorry to tag you explicitly, I do not have access to formally request reviews using the Reviewers section. |
No worries, I will look into it today. |
✅ With the latest revision this PR passed the Python code formatter. |
I think more people need to look into it. AFAIR the plan was that flang does not use the |
@pawosm-arm, thanks for looking into it. I got rid of the |
|
It did not seem like the build process got affected locally for me. Is there any other way of testing this out? |
Can you enable |
@kiranchandramohan -- this runs for me successfully and does not interfere with the placeholder file. The final |
What about the man pages and its contents. Is it the empty file or the one produced by tablegen? |
As I mentioned the man page produced at |
Can we do something similar to https://reviews.llvm.org/D128650 to avoid needing dummy |
@kiranchandramohan, I removed the placeholder |
It might not be ok. If the buildkite fails, as it does here, it will probably break buildbots too. I am not sure what is causing this though. |
Looking further into it. |
@kiranchandramohan @tarunprabhu, what do you guys think about modifying
|
I would prefer something like https://reviews.llvm.org/D128650 where the generated md/rst files are copied by the |
4f24ea6
to
bee779e
Compare
Hi @kiranchandramohan @tarunprabhu, with my latest commit the html target is built without any warnings. When I trigger the man build via
If we build with |
1d69ea5
to
cd886e1
Compare
@kiranchandramohan, @tarunprabhu, @pawosm-arm |
Modify man page doc
a33bc37
to
737c725
Compare
I am OK if it can be put in a sub-directory like clang (docs/CommandGuide). |
Just to be clear, you mean putting index.rst in something like flang/docs/CommandGuide? |
@kiranchandramohan, moved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for all the changes. Please wait for @tarunprabhu or @pawosm-arm
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?:
|
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):
This results in the following lines being generated in the
From this you can read I'm building both. |
So I have both enabled too according to my local |
I did a clean build after cherry-picking your recent commits to this PR over the same base commit (to which I'm doing git-reset each time you do a force-push). I don't know if these messages were seen before, as the build was passing before those most recent cherry-picks so not much has changed really. |
No, you are right, I hadn't done the builds back to back, just independently. I have a fix, pushing it. |
@pawosm-arm, can you test it out? |
|
Yes I'll trigger another build today. |
It looks much better now. Although the
|
Whoever has write-access, please merge this. |
Done |
@snarang181 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR. Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues. How to do this, and the rest of the post-merge process, is covered in detail here. If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again. If you don't get any reports, no action is required from you. Your changes are working as expected, well done! |
This commit removes the disablement of generating the flang docs (man pages). It was disabled as it had been failing. We had to wait until a fix for generating flang manpages has landed upstream. See llvm/llvm-project#141882
This patch refactors the Flang documentation CMake and Sphinx configuration to address build issues.
CMake changes:
gen_rst_file_from_td()
call out of the HTML-only block so that bothdocs-flang-html
anddocs-flang-man
builds depend on the generatedFlangCommandLineReference.rst
file.conf.py changes:
myst_parser
dependency as a required Markdown parser for both HTML and man builds.flang(1)
man page.Fixes #141757