]> granicus.if.org Git - llvm/commitdiff
[cmake] Use separate doctrees to prevent races between Sphinx instances
authorMichal Gorny <mgorny@gentoo.org>
Tue, 4 Oct 2016 06:09:14 +0000 (06:09 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Tue, 4 Oct 2016 06:09:14 +0000 (06:09 +0000)
Use separate doctrees between different Sphinx builders in order to
prevent race condition issues due to multiple Sphinx instances accessing
the same doctree cache in parallel.

Bug: https://llvm.org/bugs/show_bug.cgi?id=23781

Differential Revision: https://reviews.llvm.org/D23755

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283188 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/AddSphinxTarget.cmake

index a968555aa06c1f8040c006585e69ea506544e6d9..ca9f4c38ffdb513b148a07a5890e6c7a99a18738 100644 (file)
@@ -6,7 +6,7 @@
 # ``project`` should be the project name
 function (add_sphinx_target builder project)
   set(SPHINX_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/${builder}")
-  set(SPHINX_DOC_TREE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
+  set(SPHINX_DOC_TREE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees-${builder}")
   set(SPHINX_TARGET_NAME docs-${project}-${builder})
 
   if (SPHINX_WARNINGS_AS_ERRORS)