This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Include project name in Sphinx doctree dir to fix race conditions
ClosedPublic

Authored by mgorny on Nov 30 2017, 9:27 AM.

Details

Summary

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 rL283188. However, that
commit presumed that there will be only one target per builder being
run. However, rL314863 introduced a second manpage target, reintroducing
the race condition.
-

Diff Detail

Event Timeline

mgorny created this revision.Nov 30 2017, 9:27 AM
beanz accepted this revision.Nov 30 2017, 10:52 AM

LGTM.

This revision is now accepted and ready to land.Nov 30 2017, 10:52 AM
This revision was automatically updated to reflect the committed changes.