[llvm] [Offload] Introduce offload-tblgen and initial new API implementation (PR #108413)
Callum Fare via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 08:10:10 PDT 2024
================
@@ -0,0 +1,36 @@
+
+set(LLVM_TARGET_DEFINITIONS ${CMAKE_CURRENT_SOURCE_DIR}/API/OffloadAPI.td)
+list(APPEND LLVM_TABLEGEN_FLAGS -I ${CMAKE_CURRENT_SOURCE_DIR}/API)
+
+tablegen(OFFLOAD offload_api.h -gen-api)
+tablegen(OFFLOAD offload_funcs.inc -gen-func-names)
+tablegen(OFFLOAD offload_impl_func_decls.inc -gen-impl-func-decls)
+tablegen(OFFLOAD offload_entry_points.inc -gen-entry-points)
+tablegen(OFFLOAD offload_print.hpp -gen-print-header)
+
+
+add_public_tablegen_target(OffloadHeaderGen)
+
+add_llvm_library(offload_new SHARED
+ src/offload_lib.cpp
+ src/offload_impl.cpp
+ DEPENDS OffloadHeaderGen
+ LINK_LIBS omptarget omptarget.rtl.cuda omptarget.rtl.amdgpu)
----------------
callumfare wrote:
I've fixed this now, the `omptarget` dependency wasn't intentional and the plugins now get linked based on `LIBOMPTARGET_PLUGINS_TO_BUILD`
https://github.com/llvm/llvm-project/pull/108413
More information about the llvm-commits
mailing list