How to build the MLIR documentation locally (original) (raw)
This is probably a stupid question, but how do I actually build the documentation for MLIR locally? I have generated the build system with LLVM_ENABLE_DOXYGEN=ON
:
cmake -G Ninja llvm \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLLVM_TARGETS_TO_BUILD="Native" \
-DLLVM_ENABLE_DOXYGEN=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_LLD=ON
And then build something from MLIR in the hope that documentation would be generated:
cmake --build . --target mlir-opt
However, I can’t find any output files. Anyone here who knows how to do it?
> ninja -t targets | grep doc
tells me that there is a
> mlir-doc
./mlir-opt -help
OVERVIEW: MLIR modular optimizer driver
That tool is something else.
mlir-doc
will generate markdown from the dialect definitions in TableGen. There is also a mlir-doxygen
target.
The “recipe” to build the website is here mlir-www/main.yml at main · llvm/mlir-www · GitHub
Rik May 28, 2023, 7:52pm 4
Thanks both!