[PATCH] D46503: [cmake] work around a race in Sphinx.

Brooks Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 6 09:37:19 PDT 2018


brooks created this revision.
brooks added a reviewer: chandlerc.
Herald added subscribers: llvm-commits, mgorny.

Create the target directory before calling sphinx to put files in it.
Sphinx has a race where it fails with an unhandled exception if it
decides to create a directory and then someone else gets there first.


Repository:
  rL LLVM

https://reviews.llvm.org/D46503

Files:
  cmake/modules/AddSphinxTarget.cmake


Index: cmake/modules/AddSphinxTarget.cmake
===================================================================
--- cmake/modules/AddSphinxTarget.cmake
+++ cmake/modules/AddSphinxTarget.cmake
@@ -29,6 +29,8 @@
   endif()
 
   add_custom_target(${SPHINX_TARGET_NAME}
+		    COMMAND ${CMAKE_COMMAND}
+                            -E make_directory ${SPHINX_BUILD_DIR}
                     COMMAND ${SPHINX_EXECUTABLE}
                             -b ${builder}
                             -d "${SPHINX_DOC_TREE_DIR}"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46503.145400.patch
Type: text/x-patch
Size: 514 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180506/ca445b2a/attachment.bin>


More information about the llvm-commits mailing list