[libc-commits] [PATCH] D154105: [libc] Make the RPC server target always available
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Jun 30 09:31:17 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdf52a22b1b7d: [libc] Make the RPC server target always available (authored by jhuber6).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154105/new/
https://reviews.llvm.org/D154105
Files:
libc/CMakeLists.txt
libc/utils/gpu/server/CMakeLists.txt
libc/utils/gpu/server/rpc_server.h
Index: libc/utils/gpu/server/rpc_server.h
===================================================================
--- libc/utils/gpu/server/rpc_server.h
+++ libc/utils/gpu/server/rpc_server.h
@@ -22,7 +22,7 @@
/// The symbol name associated with the client for use with the LLVM C library
/// implementation.
-static const char *rpc_client_symbol_name = "__llvm_libc_rpc_client";
+inline const char *rpc_client_symbol_name = "__llvm_libc_rpc_client";
/// status codes.
typedef enum {
Index: libc/utils/gpu/server/CMakeLists.txt
===================================================================
--- libc/utils/gpu/server/CMakeLists.txt
+++ libc/utils/gpu/server/CMakeLists.txt
@@ -5,6 +5,10 @@
target_include_directories(llvmlibc_rpc_server PUBLIC ${LIBC_SOURCE_DIR}/include)
target_include_directories(llvmlibc_rpc_server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+# Ignore unsupported clang attributes if we're using GCC.
+target_compile_options(llvmlibc_rpc_server PUBLIC
+ $<$<CXX_COMPILER_ID:GNU>:-Wno-attributes>)
+
# Install the server and associated header.
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/rpc_server.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gpu-none-llvm/
Index: libc/CMakeLists.txt
===================================================================
--- libc/CMakeLists.txt
+++ libc/CMakeLists.txt
@@ -35,6 +35,11 @@
# When libc is build as part of the runtimes/bootstrap build's CMake run, we
# only need to build the host tools to build the libc. So, we just do enough
# to build libc-hdrgen and return.
+
+ # Always make the RPC server availible to other projects for GPU mode.
+ if(LIBC_GPU_BUILD OR LIBC_GPU_ARCHITECTURES)
+ add_subdirectory(utils/gpu/server)
+ endif()
return()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154105.536290.patch
Type: text/x-patch
Size: 1770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230630/588d3188/attachment.bin>
More information about the libc-commits
mailing list