diff options
author | Tim Creech <timothy.m.creech@intel.com> | 2024-06-24 04:51:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-24 09:51:34 +0100 |
commit | 64796044f4152c49e4b3c797390a83dcfd33bd46 (patch) | |
tree | 1d33d771bcf701448afea930da15ba7b4fae661e /clang/lib/Basic/SourceManager.cpp | |
parent | e5a41f0afc152cc24b8fef3aa177ef53b2e77c43 (diff) | |
download | llvm-64796044f4152c49e4b3c797390a83dcfd33bd46.zip llvm-64796044f4152c49e4b3c797390a83dcfd33bd46.tar.gz llvm-64796044f4152c49e4b3c797390a83dcfd33bd46.tar.bz2 |
[CMake][libclc] Improve dependencies to avoid build errors (#95018)
With the Makefile generator and particularly high build parallelism some
intermediate dependencies may be generated redundantly and concurrently,
leading to build failures.
To fix this, arrange for libclc's add_custom_commands to depend on
targets in addition to files.
This follows CMake documentation's[^1] guidance on add_custom_command:
> Do not list the output in more than one independent target that may
> build in parallel or the instances of the rule may conflict. Instead,
> use the add_custom_target() command to drive the command and make the
> other targets depend on that one.
Eliminating the redundant commands also improves build times.
[^1]: https://cmake.org/cmake/help/v3.29/command/add_custom_command.html
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions