summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2017-11-30 19:09:22 +0000
committerMichal Gorny <mgorny@gentoo.org>2017-11-30 19:09:22 +0000
commitb661757cd1379dcf3bc27976ed57dc9ea48b6a2e (patch)
tree8e246a0e5a388ddfb9f23dda3a641696626464d7
parent9ecb33edbe1b88d89e31f781c82e968b8525c69a (diff)
downloadbcm5719-llvm-b661757cd1379dcf3bc27976ed57dc9ea48b6a2e.tar.gz
bcm5719-llvm-b661757cd1379dcf3bc27976ed57dc9ea48b6a2e.zip
[cmake] Include project name in Sphinx doctree dir to fix race conditions
Modify add_sphinx_target() to include the project name alongside builder in Sphinx doctree directory. This aims to avoid crashes due to race conditions between multiple Sphinx instances running in parallel that attempt to create or read that directory simultaneously. This problem has originally been addressed in r283188. However, that commit presumed that there will be only one target per builder being run. However, r314863 introduced a second manpage target, reintroducing the race condition. Differential Revision: https://reviews.llvm.org/D40656 llvm-svn: 319461
-rw-r--r--llvm/cmake/modules/AddSphinxTarget.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/cmake/modules/AddSphinxTarget.cmake b/llvm/cmake/modules/AddSphinxTarget.cmake
index 4540c5c36c8..22e3dcb776a 100644
--- a/llvm/cmake/modules/AddSphinxTarget.cmake
+++ b/llvm/cmake/modules/AddSphinxTarget.cmake
@@ -19,7 +19,7 @@ endif()
# ``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-${builder}")
+ set(SPHINX_DOC_TREE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees-${project}-${builder}")
set(SPHINX_TARGET_NAME docs-${project}-${builder})
if (SPHINX_WARNINGS_AS_ERRORS)
OpenPOWER on IntegriCloud