[PATCH] D95284: utils/release: Add script for building release documentation

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 01:53:34 PST 2021


hans added inline comments.


================
Comment at: llvm/utils/release/build-docs.sh:20
+  echo "Build the documentation for an LLVM release.  This only needs to be "
+  echo "done for -final releases."
+  echo "usage: `basename $0`"
----------------
I don't know if the script needs to comment on whether docs need to be built for -final releases or others.

(I also think it's useful to have them for release candidates, so people can get an idea of what the current state of the docs are.)


================
Comment at: llvm/utils/release/build-docs.sh:60
+if [ -z "$srcdir" ]; then
+  srcdir="../../"
+fi
----------------
This should be relative to the script's dir, not the cwd. Is there some way to figure this out in bash?


================
Comment at: llvm/utils/release/build-docs.sh:69
+
+release_tag_commit=`git -C $srcdir rev-list -1 llvmorg-$release`
+head_commit=`git -C $srcdir rev-parse HEAD`
----------------
This assumes srcdir is a git checkout. One could imagine someone wanting to build the docs after extracting the llvm-project tarball for example.

I think the script should either be able to build against any src dir, or it should take a git revision/tag and grab the sources itself.

In the script I used, it does the latter, using

```
curl -L https://github.com/llvm/llvm-project/archive/$GIT_REF.tar.gz | tar --strip-components=1 -xzf -
```


================
Comment at: llvm/utils/release/build-docs.sh:83
+               -DLLVM_ENABLE_SPHINX=ON \
+               -DLLVM_INCLUDE_DOCS=ON \
+               -DLLVM_DOXYGEN_SVG=ON \
----------------
In my script I had -DLLVM_BUILD_DOCS=ON
I see that both exist in the cmake files.. not sure what the difference is.


================
Comment at: llvm/utils/release/build-docs.sh:100
+               doxygen-polly
+
+
----------------
In my script I had to move the html around a bit to match the layout of previous docs builds, and so the links to the docs would work.

For example, the clang docs would be in tools/clang/docs/html, but the link would point to tools/clang/docs/


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95284/new/

https://reviews.llvm.org/D95284



More information about the llvm-commits mailing list