aboutsummaryrefslogtreecommitdiff
path: root/libc/include/CMakeLists.txt
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-06-06 11:10:44 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-06-15 11:02:24 -0500
commitdcdfc963d7934a1313094b6fe9ce7aa04debe495 (patch)
tree45c236eb8096cf64ee9b2db9d2167d70c4638e58 /libc/include/CMakeLists.txt
parent719d77ed28b69101aaa03cf82d64ede3b29cafcd (diff)
downloadllvm-dcdfc963d7934a1313094b6fe9ce7aa04debe495.zip
llvm-dcdfc963d7934a1313094b6fe9ce7aa04debe495.tar.gz
llvm-dcdfc963d7934a1313094b6fe9ce7aa04debe495.tar.bz2
[libc] Export GPU extensions to `libc` for external use
The GPU port of the LLVM C library needs to export a few extensions to the interface such that users can interface with it. This patch adds the necessary logic to define a GPU extension. Currently, this only exports a `rpc_reset_client` function. This allows us to use the server in D147054 to set up the RPC interface outside of `libc`. Depends on https://reviews.llvm.org/D147054 Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D152283
Diffstat (limited to 'libc/include/CMakeLists.txt')
-rw-r--r--libc/include/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index f7b949f..dd24d01 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -488,6 +488,19 @@ add_gen_header(
.llvm-libc-types.wchar_t
)
+if(LIBC_TARGET_ARCHITECTURE_IS_GPU)
+ file(MAKE_DIRECTORY "gpu")
+
+ add_gen_header(
+ gpu_rpc
+ DEF_FILE gpu/rpc.h.def
+ GEN_HDR gpu/rpc.h
+ DEPENDS
+ .llvm_libc_common_h
+ .llvm-libc-types.rpc_opcodes_t
+ )
+endif()
+
if(NOT LLVM_LIBC_FULL_BUILD)
# We don't install headers in non-fullbuild mode.
return()