[clang] [clang][MBD] set up module build daemon infrastructure (PR #67562)

Michael Spencer via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 25 14:12:35 PDT 2023


Bigcheese wrote:

> > Implementing a timeout as part of this patch as a safety measure seems worth while too but I'm not sure I understand your final solution. You all spawned a clang job that had to communicate with the daemon to make sure one did not exist?
> 
> It is something like this: https://github.com/apple/llvm-project/blob/next/clang/test/CAS/fdepscan-daemon.c
> 
> The "daemon" binary can be launched as a normal process and it takes `--` option, which has the arguments of the clang process it needs to run that talk to itself. The lifetime of the "daemon" is now bounded to that normal process and will not be left behind after testing is done.

I agree with doing this for all the non daemon launch tests. For those you can just run clang in a way that lit doesn't care if it fails, kill the daemon, then check the output of clang.

It doesn't really need to do a fully clean shutdown as no other process should be connecting, it can just call `shutdownDaemon`.

https://github.com/llvm/llvm-project/pull/67562


More information about the cfe-commits mailing list