Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LIBCLC] Improve CMake dependency tracking (#5019)
This is (hopefully) resolving an issue where after changing the implementation of some built-ins in libclc the changes wouldn't get picked up correctly by CMake and the old implementation would still be used and a clean build would be required. As far as I can tell what was happening is that CMake would properly rebuild up until the `opt` stage but wouldn't do the `prepare_builtins` or `remangle` stages, leaving the old bitcode for these, and that is the libraries that are used by clang. The problem seems to be with how the dependencies are specified between these two, dependencies between custom commands and custom targets are really tricky with CMake and it seems like the way it was setup didn't work. The most reliable way of connecting multiple custom commands, especially in the same file like here, is to just use the `OUTPUT` argument of the previous custom command as a `DEPENDS` in the next one. So I've updated these two stages to work like that, and now as far as I can tell the dependencies are picked up properly.
- Loading branch information