[PATCH] D23755: cmake: Add an ordering dep between HTML & man Sphinx targets

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 11:47:35 PDT 2016


thakis added a comment.

I agree that relying on the console pool is a bit hacky. It looks like cmake doesn't allow having custom pools though, and having an explicit dep needlessly constrains the build.

One thing we used to do in Chromium before we had ninja was to have a small python wrapper with a lock file for exclusiveness. Linux has http://linux.die.net/man/1/flock, so you could just run `flock sphinx.lock <command>` there, but that's linux only. Our mac implementation was

  def ExecFlock(self, lockfile, *cmd_list):
    """Emulates the most basic behavior of Linux's flock(1)."""
    # Rely on exception handling to report errors.
    fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
    fcntl.flock(fd, fcntl.LOCK_EX)
    return subprocess.call(cmd_list)

The lock file model seems like a good fit for sphinx, and it'd work with all of CMake's generators.


https://reviews.llvm.org/D23755





More information about the llvm-commits mailing list