LLVM has a large doc base which takes literally 12hours+ to build on my configuration. This post is a collection of techniques I found that could improve either the build doc size/build time/quality
Generic Changes
- Change
VERBATIM_HEADERSandSOURCE_BROWSERtoNO. This would remove embedded LLVM source, results in much smaller build size and shorter build time. - Change
STRIP_FROM_PATHto correct file-system folder base, this would fix some issues where absolute path is included in the product
Speedup Indexing
After generating the docs, you can generate Apple Docset, in which the indexing process would take more than 12hours normally. Edit the generated Makefile
- Clang:
$(BUILD_ROOT)/tools/clang/docs/doxygen/html/Makefile
- LLVM:
$(BUILD_ROOT)/docs/doxygen/html/Makefile
Change
$(XCODE_INSTALL)/usr/bin/docsetutil index $(DOCSET_NAME) to
$(XCODE_INSTALL)/usr/bin/docsetutil index -skip-text $(DOCSET_NAME)
will decrease the indexing time to roughly an hour or so without
negative impact as far as I know
Optional
- Change
CREATE_SUBDIRStoYES - Edit
DOCSET_FEEDNAMEDOCSET_BUNDLE_IDDOCSET_PUBLISHER_IDDOCSET_PUBLISHER_NAMEifGENERATE_DOCSETis set toYES(Used for building Apple Docset - Change
DOT_IMAGE_FORMATtosvgandINTERACTIVE_SVGtoYES, the former would use SVGs instead of PNGs, the latter would generate interactive,zoom-able inherit diagrams - For Apple Docset users, refer to https://kapeli.com/docsets#doxygen for more specific instructions