mgorny added a comment. Well, there's also another option of using separate SPHINX_DOC_TREE_DIRs, i.e. make the two targets not share working directories and make them fully parallel-friendly. https://reviews.llvm.org/D23755