File: CMakeLists.txt

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (32 lines) | stat: -rw-r--r-- 1,465 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
add_library(llvmlibc_rpc_server STATIC
  ${LIBC_SOURCE_DIR}/src/stdio/printf_core/writer.cpp
  ${LIBC_SOURCE_DIR}/src/stdio/printf_core/converter.cpp
  rpc_server.cpp
)

# Include the RPC implemenation from libc.
target_include_directories(llvmlibc_rpc_server PRIVATE ${LIBC_SOURCE_DIR})
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>)
target_compile_definitions(llvmlibc_rpc_server PUBLIC
                           LIBC_COPT_USE_C_ASSERT
                           LIBC_COPT_ARRAY_ARG_LIST
                           LIBC_COPT_PRINTF_DISABLE_WRITE_INT
                           LIBC_COPT_PRINTF_DISABLE_INDEX_MODE
                           LIBC_NAMESPACE=${LIBC_NAMESPACE})

# Install the server and associated header.
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/llvmlibc_rpc_server.h
        DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
        COMPONENT libc-headers)
install(FILES ${LIBC_SOURCE_DIR}/include/llvm-libc-types/rpc_opcodes_t.h
        DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
        RENAME llvmlibc_rpc_opcodes.h
        COMPONENT libc-headers)
install(TARGETS llvmlibc_rpc_server
        ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}"
        COMPONENT libc)