Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I think this looks reasonable, and the logic seems mostly better than the one before. As far as I can see with the current code in git, there's nothing stopping from building e.g. lldb-tablegen-host and clang-tablegen-host at the same time, is that right?
This code works best if the tablegens are processed in a roughly topological order, e.g. in a build with clang and lldb, I guess it's better if clang is listed before lldb in LLVM_ENABLE_PROJECTS, because otherwise clang-tablegen-host would build lldb-tablegen-host before?
I haven't experienced lldb, though, I guess lldb-tablegen-host and clang-tablegen-host would be scheduled in parallel.
This code works best if the tablegens are processed in a roughly topological order, e.g. in a build with clang and lldb, I guess it's better if clang is listed before lldb in LLVM_ENABLE_PROJECTS, because otherwise clang-tablegen-host would build lldb-tablegen-host before?
I think such optimization would not gain the big win. Nested CMake invocation would be evil and far from optimal I suppose.
I just wanted to introduce consistency.
That said, I will not stop someone's proposing better scheduling.
I can try to check if this happens or not.
Nested CMake invocation would be evil and far from optimal I suppose.
I don't quite understand what you refer to here?
I just wanted to introduce consistency.
That said, I will not stop someone's proposing better scheduling.
I don't think it's necessarily worth spending effort on at this point, I just wanted to note the pros and cons. Doing things suboptimally (in a case where it's trivial for the user to fix it) is totally fine, compared to doing things in an unspecified possibly broken way.
This feels like it could have unintended and unfortunate consequences. Does this not make mlir-tablegen depend on clang-tablegen? If it does that could increase iteration loops where native tools are involved by building unrelated things that don't strictly need to be built or have a dependency.
I'm curious where you're seeing race conditions with the native builds. Makefile and Ninja generators shouldn't race (makefile because of the job server model and Ninja because of the use of the console pool).
I know this is far from optimal rather than suboptimal. I don't intend any optimizations.
Does this not make mlir-tablegen depend on clang-tablegen? If it does that could increase iteration loops where native tools are involved by building unrelated things that don't strictly need to be built or have a dependency.
I know this will introduce longer dependency chain. That said, subsequent NATIVE's actions would not rebuild preceding artifacts (unless the builder would be silly).
I'm curious where you're seeing race conditions with the native builds. Makefile and Ninja generators shouldn't race (makefile because of the job server model and Ninja because of the use of the console pool).
I have just followed D54153 and I haven't met any matters in my use cases. I haven't thought this logic could be optimized (in this).
At the moment I would like to land this unconditionally. I think we could exclude this conditionally later.
This will regress build times for Makefile and Ninja builds, particularly clean builds (which is what GitHub Actions, Azure Pipelines, and Google Cloud Pipelines all do).
Please restrict the change to only impact Visual Studio which I think is the only generator that can be impacted by the race condition. Xcode may be sub-optimal with the current behavior but probably isn't impacted by the race because the filesystem locking behavior is likely NTFS-specific.