[llvm] [Offload] Fix missing dependencies in Offload API generation (PR #142776)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 4 06:48:50 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-offload
Author: Callum Fare (callumfare)
<details>
<summary>Changes</summary>
Thanks to @<!-- -->RossBrunton for spotting this.
We attempt to clang-format the generated Offload header files, but if clang-format isn't available we just copy the generated files instead. That fallback path was missing the correct dependencies.
Fixes #<!-- -->142756
---
Full diff: https://github.com/llvm/llvm-project/pull/142776.diff
1 Files Affected:
- (modified) offload/liboffload/API/CMakeLists.txt (+2)
``````````diff
diff --git a/offload/liboffload/API/CMakeLists.txt b/offload/liboffload/API/CMakeLists.txt
index cf6e132aa57a9..216710faa84f6 100644
--- a/offload/liboffload/API/CMakeLists.txt
+++ b/offload/liboffload/API/CMakeLists.txt
@@ -42,5 +42,7 @@ else()
COMMAND ${CMAKE_COMMAND} -E copy_if_different generated/${file}.gen ${CMAKE_CURRENT_BINARY_DIR}/${file}
DEPENDS generated/${file}.gen
)
+ add_custom_target(OffloadAPI.${file} DEPENDS ${file})
+ add_dependencies(OffloadAPI OffloadAPI.${file})
endforeach()
endif()
``````````
</details>
https://github.com/llvm/llvm-project/pull/142776
More information about the llvm-commits
mailing list