[llvm] [Offload] Fix missing dependencies in Offload API generation (PR #142776)
Callum Fare via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 4 06:48:10 PDT 2025
https://github.com/callumfare created https://github.com/llvm/llvm-project/pull/142776
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
>From e2fcfba83d4e337176145d51d0f40c2b08d392b3 Mon Sep 17 00:00:00 2001
From: Callum Fare <callum at codeplay.com>
Date: Wed, 4 Jun 2025 14:46:20 +0100
Subject: [PATCH] Fix missing dependencies in Offload API generation
---
offload/liboffload/API/CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
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()
More information about the llvm-commits
mailing list