Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL][libclc] Fix missing build dependencies (#13145)
This commit fixes the problem of missing build dependencies between libclc source files and their various includes. We would like to do this with compiler-generated dependency files because then the dependencies are accurate and there are no false positives, leading to unnecessary rebuilds. This is how regular C/C++ dependencies are usually tracked by CMake. Note that this variable is an internal API so is not guaranteed to work, but then again *all* of CMake's support for new languages (which we use for CLC/LL languages) is an internal API. On balance this change is probably worth it due to how minimally invasive it is. The alternative would be to either: 1. list/glob all possible files in the directory as dependencies, which would lead to false positives. 2. rewrite the library generation as a loop over all files and calling `add_custom_command`, which can produce a dependency file (by tweaking our clang command line) that can also be fed back to the same command via the `DEPFILE` argument. This would be a much larger change and is not as "neat".
- Loading branch information