[llvm] [Runtimes] Prevent builtins from clobbering runtimes configuration (PR #185664)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 10 08:23:15 PDT 2026
jhuber6 wrote:
`NOCLOBBER_DEPENDS`? It's just a CMake function argument meant to mirror the existing `DEPENDS`, it's not a core CMake feature, just something passed in.
To reiterate, this should just stop us from marking the CMake as stale. Basically, we have this in the code
```
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}-clobber-stamp
DEPENDS ${ARG_DEPENDS}
COMMAND ${CMAKE_COMMAND} -E touch ${BINARY_DIR}/CMakeCache.txt
COMMAND ${CMAKE_COMMAND} -E touch ${STAMP_DIR}/${name}-mkdir
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${name}-clobber-stamp
COMMENT "Clobbering bootstrap build and stamp directories"
)
```
This directly touches the CMake files and when combined with `BUILD_ALWAYS` this means that the CMake files will always need to fully reconfigure every single time. What this patch does is split out the dependencies, the `noclobber` dependencies DO NOT participate in this special clobbering step, but the other dependencies are maintained so they should still build in order.
As far as I'm aware, this code was originally introduced for test suite handling but was interacting very poorly with the builtins build. That use-case should still work and I don't think them being connected was truly intended. But, it is difficult to predict with LLVM's sprawling CMake.
https://github.com/llvm/llvm-project/pull/185664
More information about the llvm-commits
mailing list