[llvm] [cmake] Fix overlapping native llvm-min-tblgen builds (PR #121021)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 24 00:27:20 PST 2024


arthurqiu wrote:

@joker-eph this is indeed fragile. Following previous discussion in https://reviews.llvm.org/D149072, it shouldn't be a problem for Ninja generator because of the use of console tool and for Visual Studio because of the introduction of dependency chain. It mentioned job server for GNU make, but I don't see it's being used anywhere.

I think it's possible to leverage job server to serialize the sub-make invocation. More specifically, below setup is needed if I understand it correctly:
Step 1. create a named pipe
Step 2. generate 1 one-byte token into the pipe
Step 3. pass the named pipe via `--jobserver-auth` option for the sub-make invocation

Alternatively, shall we simply apply the dependency chain to GNU make generator as well? It's mentioned in https://reviews.llvm.org/D149072 that it would regress Makefile build time. However, I don't feel it would regress much compared with the job server solution.

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


More information about the llvm-commits mailing list