[llvm] [LLVM] Remove explicit dependency on builtins build (PR #159854)

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 24 11:31:51 PDT 2025


petrhosek wrote:

I tried change locally and looked at the generated Ninja file but I don't see any dependency edge between `builtins-*` and `runtimes-*` targets; while `runtimes/all` depends on both `builtins-*` and `runtimes-*` targets, there's no guarantee that former will be built before the latter, so I'm not convinced this change is correct and it may be working purely by luck.

I think the correct solution would be to avoid relying on [`DEPENDS` in `ExternalProject_Add`](https://github.com/llvm/llvm-project/blob/f95aacaf0465925e508d019b47efcb635428d049/llvm/cmake/modules/LLVMExternalProjectUtils.cmake#L382) which adds a dependency to all steps and instead use [`ExternalProject_Add_StepDependencies`](https://cmake.org/cmake/help/latest/module/ExternalProject.html#command:externalproject_add_stepdependencies) to add fine-grained dependencies between targets that need them, but that's going to need some refactoring in [`LLVMExternalProjectUtils.cmake`](https://github.com/llvm/llvm-project/blob/f95aacaf0465925e508d019b47efcb635428d049/llvm/cmake/modules/LLVMExternalProjectUtils.cmake). 

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


More information about the llvm-commits mailing list