0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-06 22:38:55 +00:00

Link the ebpf plugin against libbpf directly instead of through libnetdata. ()

This commit is contained in:
Austin S. Hemmelgarn 2025-01-28 13:35:36 -05:00 committed by GitHub
parent 955b174259
commit 7e6e3bbaf7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 9 deletions
CMakeLists.txt
packaging/cmake/Modules
src/libnetdata

View file

@ -2156,11 +2156,6 @@ if(OS_WINDOWS)
endif()
endif()
# ebpf
if(ENABLE_PLUGIN_EBPF)
netdata_add_libbpf_to_target(libnetdata)
endif()
# judy
target_link_libraries(libnetdata PUBLIC judy)
@ -2657,6 +2652,7 @@ if(ENABLE_PLUGIN_EBPF)
add_executable(ebpf.plugin ${EBPF_PLUGIN_FILES})
target_link_libraries(ebpf.plugin libnetdata)
netdata_add_libbpf_to_target(ebpf.plugin)
netdata_add_ebpf_co_re_to_target(ebpf.plugin)
install(TARGETS ebpf.plugin

View file

@ -93,7 +93,7 @@ endfunction()
# Add libbpf as a link dependency for the given target.
function(netdata_add_libbpf_to_target _target)
target_link_libraries(${_target} PUBLIC libbpf_library)
target_link_libraries(${_target} libbpf_library)
target_include_directories(${_target} BEFORE PUBLIC "${NETDATA_LIBBPF_INCLUDE_DIRECTORIES}")
target_compile_options(${_target} PUBLIC "${NETDATA_LIBBPF_COMPILE_OPTIONS}")
add_dependencies(${_target} libbpf)

View file

@ -125,9 +125,6 @@ extern const char *netdata_configured_host_prefix;
#include "log/systemd-journal-helpers.h"
#if defined(HAVE_LIBBPF) && !defined(__cplusplus)
#include "ebpf/ebpf.h"
#endif
#include "eval/eval.h"
#include "statistical/statistical.h"
#include "adaptive_resortable_list/adaptive_resortable_list.h"